Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/tests/browser/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

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 V0.5 in Prozent
C=96 H=100 G=97

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