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

Quellcode-Bibliothek 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."
  );
});

100%


¤ 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.0.28Bemerkung:  (vorverarbeitet)  ¤

*Bot Zugriff






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 ist noch experimentell.