Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/layers/apz/test/mochitest/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 2 kB image not shown  

Quelle  helper_bug1756814.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/gfx/layers/apz/test/mochitest/helper_bug1756814.html


<!DOCTYPE HTML>
<html>
<head>
  <script type="application/javascript" src="apz_test_utils.js"></script>
  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
  <script src="/tests/SimpleTest/paint_listener.js"></script>
</head>
<body>
  <div style="height: 200vh;"></div>
</body>
<script type="application/javascript">

async function test() {
  const moveDistance = 10;

  // Start dragging the vertical scrollbar thumb.
  const startPoint = await scrollbarDragStart(window, 1);
  await promiseNativeMouseEventWithAPZ({
    target: window,
    offsetX: startPoint.x,
    offsetY: startPoint.y,
    type: "mousemove",
  });
  await promiseNativeMouseEventWithAPZ({
    target: window,
    offsetX: startPoint.x,
    offsetY: startPoint.y,
    type: "mousedown",
  });

  // Move the thumb and wait for a scroll event triggered by the movement.
  let scrollEventPromise = waitForScrollEvent(window);
  await promiseNativeMouseEventWithAPZ({
    target: window,
    offsetX: startPoint.x,
    offsetY: startPoint.y + moveDistance,
    type: "mousemove",
  });
  await scrollEventPromise;

  let scrollPosition = window.scrollY;

  // Append an element to the scroll container to expand the scroll range.
  const content = document.createElement("div");
  content.style.height = "200vh";
  document.body.appendChild(content);

  // flush the above change.
  document.documentElement.getBoundingClientRect();

  // Make sure the change has been reflected into APZ.
  await promiseApzFlushedRepaints();

  // Move the thumb again.
  scrollEventPromise = waitForScrollEvent(window);
  await promiseNativeMouseEventWithAPZ({
    target: window,
    offsetX: startPoint.x,
    offsetY: startPoint.y + moveDistance * 2,
    type: "mousemove",
  });

  await scrollEventPromise;
  ok(window.scrollY <= scrollPosition * 2,
     `The scroll position ${window.scrollY} should be less than ${scrollPosition*2}`);

  await promiseNativeMouseEventWithAPZ({
    target: window,
    offsetX: startPoint.x,
    offsetY: startPoint.y + moveDistance * 2,
    type: "mouseup",
  });
}

waitUntilApzStable()
.then(test)
.then(subtestDone, subtestFailed);

</script>
</html>

Messung V0.5 in Prozent
C=96 H=100 G=97

¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet am  2026-08-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.