Eine aufbereitete Darstellung der Quelle

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


Quelle  browser_scriptCache_load_events.js  Sprache: JAVA


const TEST_URL =
  "https://example.com/browser/dom/tests/browser/page_scriptCache_load_events.html";

async function testOrder() {
  ChromeUtils.clearResourceCache();
  Services.cache2.clear();

  const tab = await BrowserTestUtils.openNewForegroundTab({
    gBrowser,
    url: TEST_URL,
  });

  // The script should be executed in between DOMContentLoaded and load events.

  // Uncached cache.
  let result = await SpecialPowers.spawn(tab.linkedBrowser, [], () => {
    return content.document.getElementById("
result").textContent;
  });
  is(result, "
DOMContentLoaded+script+load");

  await BrowserTestUtils.reloadTab(tab);

  // Cached cache.
  result = await SpecialPowers.spawn(tab.linkedBrowser, [], () => {
    return content.document.getElementById("
result").textContent;
  });
  is(result, "
DOMContentLoaded+script+load");

  BrowserTestUtils.removeTab(tab);
}

add_task(async function test_withoutNavigationCache() {
  await SpecialPowers.pushPrefEnv({
    set: [["
dom.script_loader.experimental.navigation_cache", false]],
  });
  registerCleanupFunction(() => SpecialPowers.popPrefEnv());

  await testOrder();
});

add_task(async function test_withNavigationCache() {
  await SpecialPowers.pushPrefEnv({
    set: [["
dom.script_loader.experimental.navigation_cache", true]],
  });
  registerCleanupFunction(() => SpecialPowers.popPrefEnv());

  await testOrder();
});

Messung
CHZG
1009910099

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*Bot Zugriff







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,189,100
#Domains=945,629