Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/docshell/test/browser/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  browser_bug1206879.js

  Sprache: JAVA
 

add_task(async function () {
  let url =
    getRootDirectory(gTestPath).replace(
      "chrome://mochitests/content/",
      // eslint-disable-next-line @microsoft/sdl/no-insecure-url
      "http://example.com/"
    ) + "file_bug1206879.html";
  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, url, true);

  let numLocationChanges = await SpecialPowers.spawn(
    tab.linkedBrowser,
    [],
    async function () {
      let webprogress = content.docShell.QueryInterface(Ci.nsIWebProgress);
      let locationChangeCount = 0;
      let listener = {
        onLocationChange(aWebProgress, aRequest, aLocation) {
          info("onLocationChange: " + aLocation.spec);
          locationChangeCount++;
          this.resolve();
        },
        QueryInterface: ChromeUtils.generateQI([
          "nsIWebProgressListener",
          "nsISupportsWeakReference",
        ]),
      };
      let locationPromise = new Promise(resolve => {
        listener.resolve = resolve;
      });
      webprogress.addProgressListener(
        listener,
        Ci.nsIWebProgress.NOTIFY_LOCATION
      );

      content.frames[0].history.pushState(nullnull"foo");

      await locationPromise;
      webprogress.removeProgressListener(listener);

      return locationChangeCount;
    }
  );

  gBrowser.removeTab(tab);
  is(
    numLocationChanges,
    1,
    "pushState with a different URI should cause a LocationChange event."
  );
});

Messung V0.5 in Prozent
C=94 H=95 G=94

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet am  2026-06-04) ¤

*© 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.