Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/events/test/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  window_bug659071.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/dom/events/test/window_bug659071.html


<!DOCTYPE HTML>
<html>
<head>
  <title>Test for Bug 659071</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<video id="v" controls></video>
<script type="application/javascript">

SimpleTest.waitForFocus(runTests, window);

function ok() {
  window.opener.ok.apply(window.opener, arguments);
}

function info() {
  window.opener.info.apply(window.opener, arguments);
}

async function waitForCondition(aFunc) {
  for (let i = 0; i < 30; i++) {
    await (new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))));
    if (aFunc(SpecialPowers.getFullZoom(window))) {
      return true;
    }
  }
  return false;
}

async function runTests() {
  await SpecialPowers.pushPrefEnv(
    {
      "set": [
        ["mousewheel.with_control.action", 3],
        ["test.events.async.enabled", true],
      ]
    }
  );

  const video = document.getElementById("v");

  for (let i = 0; i < 3; i++) {
    synthesizeWheel(video, 10, 10,
      { deltaMode: WheelEvent.DOM_DELTA_LINE, ctrlKey: true,
        deltaX: 0, deltaY: 1.0, lineOrPageDeltaX: 0, lineOrPageDeltaY: 1 });
    if (await waitForCondition(aZoomLevel => aZoomLevel < 1.0)) {
      break;
    }
    info("Retrying zoom out...");
  }
  let zoomLevel = SpecialPowers.getFullZoom(window);
  ok(
    zoomLevel < 1.0,
    `Failed to zoom out with turning wheel to bottom, got: ${zoomLevel}`
  );

  for (let i = 0; i < 4; i++) {
    synthesizeWheel(video, 10, 10,
      { deltaMode: WheelEvent.DOM_DELTA_LINE, ctrlKey: true,
        deltaX: 0, deltaY: -1.0, lineOrPageDeltaX: 0, lineOrPageDeltaY: -1 });
    if (await waitForCondition(aZoomLevel => aZoomLevel > 1.0)) {
      break;
    }
    info("Retrying zoom in...");
  }
  zoomLevel = SpecialPowers.getFullZoom(window);
  ok(
    zoomLevel > 1.0,
    `Failed to zoom in with turning wheel to top, got: ${zoomLevel}`
  );

  synthesizeKey("0", { accelKey: true });
  ok(
    await waitForCondition(aZoomLevel => aZoomLevel == 1.0),
    "Failed to reset zoom at finish the test"
  );
  opener.finish();
}

</script>
</body>
</html>

Messung V0.5
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.18 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.