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

Quelle  test_scroll_event_ordering.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/layout/base/tests/test_scroll_event_ordering.html


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=785588
-->

<head>
  <title>Test for Bug 785588 --- ordering of scroll-related events</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>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=785588">Mozilla Bug 785588</a>
<div id="content">
  <div id="d" style="border:2px solid black; width:100px; height:100px; overflow:auto">
    <div id="inner" style="height:200px;">Hello</div>
  </div>
</div>
<pre id="test">
<script>
SimpleTest.waitForExplicitFinish();

var smoothScrollPref = "general.smoothScroll";

var d = document.getElementById("d");
d.scrollTop = 0;
var inner = document.getElementById("inner");

var state = "initial";

function onFrame() {
  is(state, "didOnScroll""Must have got scroll event already");
  state = "didOnFrame";
  SimpleTest.finish();
}

function onScroll() {
  is(state, "initial""Must be in initial state");
  ok(d.scrollTop > 0, "Must have scrolled by some amount (got " + d.scrollTop + ")");
  state = "didOnScroll";
}

function doTest() {
  window.getSelection().collapse(inner.firstChild, 0);
  window.requestAnimationFrame(onFrame);
  d.onscroll = onScroll;
  d.scroll(0, 100);
}

function prepareTest() {
  // Start the test after we've gotten at least one rAF callback, to make sure
  // that rAF is no longer throttled. (See bug 1145439.)
  window.requestAnimationFrame(function() {
    SpecialPowers.pushPrefEnv({"set":[[smoothScrollPref, false]]}, doTest);
  });
}

SimpleTest.waitForFocus(prepareTest);

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

Messung V0.5
C=94 H=86 G=89

¤ Dauer der Verarbeitung: 0.0 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.