ew-parent #item {
      left: 400px;
    }

    section {
      position: relative;
    }

    body {
      margin-left: 0;
    }
  </style>
  <script>
    promise_test(async t => {
      const item = document.querySelector("#item");
      assert_equals(item.getBoundingClientRect().x, 0);
      document.querySelector("#new-parent").moveBefore(item, null);
      await new Promise(resolve => item.addEventListener("transitionstart", resolve));
      assert_equals(item.getBoundingClientRect().x, 200);
    });
 