 width: 100px; height: 100px; background: blue"></div>
</div>
<script>

promise_test(async () => {
  const watcher = new ScoreWatcher;

  // Wait for the initial render to complete.
  await waitForAnimationFrames(2);

  // Modify the position of the div.
  const parent = document.querySelector("#parent");
  parent.style.top = '400px';

  // We should track parent and child separately.
  const expectedScore = computeExpectedScore(100 * (100 + 100), 100) * 2;

  // Observer fires after the frame is painted.
 