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  browser_bug1757410.js   Sprache: JAVA

 
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */


"use strict";

const PAGECONTENT =
  "" +
  "" +
  "" +
  "";

const pageUrl = "data:text/html," + encodeURIComponent(PAGECONTENT);

add_task(async function test() {
  if (window.devicePixelRatio == 1) {
    ok(
      true,
      "Skip this test since this test is supposed to run on HiDPI mode, " +
        "the devixePixelRato on this machine is " +
        window.devicePixelRatio
    );
    return;
  }

  const tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, pageUrl);

  // Scroll the content a bit.
  const originalScrollPosition = await SpecialPowers.spawn(
    tab.linkedBrowser,
    [],
    async () => {
      content.document.scrollingElement.scrollTop = 100;
      return content.document.scrollingElement.scrollTop;
    }
  );

  // Disabling HiDPI mode and check the scroll position.
  SpecialPowers.DOMWindowUtils.setHiDPIMode(false);
  // Make sure we restore even if this test failed.
  registerCleanupFunction(() => {
    SpecialPowers.DOMWindowUtils.restoreHiDPIMode();
  });

  const scrollPosition = await SpecialPowers.spawn(
    tab.linkedBrowser,
    [],
    async () => {
      return content.document.scrollingElement.scrollTop;
    }
  );
  is(
    originalScrollPosition,
    scrollPosition,
    "The scroll position should be kept"
  );
  BrowserTestUtils.removeTab(tab);
});

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

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