Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  browser_bug2007897.js

  Sprache: JAVA
 

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


"use strict";

const { TabStateFlusher } = ChromeUtils.importESModule(
  "resource:///modules/sessionstore/TabStateFlusher.sys.mjs"
);

// Restore a page containing a cross-origin about:blank iframe
add_task(async function test_restore_with_cross_origin_blank_iframe() {
  const tab = await BrowserTestUtils.openNewForegroundTab(
    gBrowser,
    "https://example.com/browser/docshell/test/browser/file_2007897.html"
  );

  const blankLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, {
    wantLoad: "about:blank",
    includeSubFrames: true,
  });
  await SpecialPowers.spawn(tab.linkedBrowser, [], async () => {
    const ifr = content.document.querySelector("iframe");
    await SpecialPowers.spawn(ifr, [], () => {
      // Must use wrappedJSObject so we use the right content principal
      content.wrappedJSObject.location = "about:blank";
    });
  });
  await blankLoaded;

  await TabStateFlusher.flush(tab.linkedBrowser);

  const sessionStoreClosedObjectsChanged = TestUtils.topicObserved(
    "sessionstore-closed-objects-changed"
  );
  gBrowser.removeTab(tab);
  await sessionStoreClosedObjectsChanged;
  const restoredTab = SessionStore.undoCloseTab(window, 0);
  await BrowserTestUtils.waitForEvent(restoredTab, "SSTabRestored");

  // The crash doesn't cause the test to fail, so check if the iframe was restored
  await SpecialPowers.spawn(restoredTab.linkedBrowser, [], async () => {
    const ifr = content.document.querySelector("iframe");
    Assert.ok(ifr, "did not crash");
    Assert.ok(!ifr.contentDocument && !ifr.document, "iframe is restricted");
  });

  BrowserTestUtils.removeTab(restoredTab);
});

Messung V0.5 in Prozent
C=91 H=95 G=92

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=141584
#Domains=752002