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 2 kB image not shown  

SSL test_bug851485.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/layout/base/tests/test_bug851485.html


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

<head>
  <meta charset="utf-8">
  <title>Test for Bug 851485</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"/>
  <script type="application/javascript">

  /** Test for Bug 851485 **/

SimpleTest.waitForExplicitFinish();

var testRunning = false;
async function runTest() {
  if (testRunning) {
    return;
  }
  testRunning = true;

  var e = document.getElementsByTagName('iframe')[0];
  var win = e.contentWindow;

  var p = new Promise((r) => { win.addEventListener("hashchange", r, { once: true }); });
  win.location.hash = '#anchor';
  await p;

  win.scrollTo(0, 500);

  p = new Promise((r) => { e.addEventListener("load", r, { once: true }); });
  win.location.reload();
  await p;

  is(win.location.hash, "#anchor""We set the location's hash to 'anchor'");
  // Allow a half pixel difference because the scroll position is aligned with
  // screen pixels instead of CSS pixels (bug 1774315).
  isfuzzy(win.scrollY, 500, 0.5, "Reloading keeps scroll position");

  var link = win.document.getElementsByTagName('a')[0];
  var anchor = win.document.getElementsByTagName('a')[1];
  p = new Promise((r) => {
    var observer = new IntersectionObserver((entries) => {
      info("IntersectionObserver: entering callback")
      if (entries.some((entry) => entry.isIntersecting)) {
        info("IntersectionObserver: some entry isIntersecting; disconnecting")
        observer.disconnect();
        r();
      }
    });
    observer.observe(anchor);
  });
  win.document.body.offsetHeight;
  synthesizeMouseAtCenter(link, {type: "mousedown"}, win);
  synthesizeMouseAtCenter(link, {type: "mouseup"}, win);
  info("Sending click")
  sendMouseEvent({type: "click"}, link, win);
  await p;
  let actualScroll = win.scrollY;
  info("Promise resolved (for IntersectionObserver). win.scrollY is " +
       actualScroll);

  ok(actualScroll > 3000, "Scrolling after load works.");

  SimpleTest.finish();
}


  </script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=851485">Mozilla Bug 851485</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
<iframe src="file_bug842853.html"></iframe>
<script>

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

Messung V0.5
C=89 H=89 G=88

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