Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  test_preloading.js

  Sprache: JAVA
 

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


add_task(async function testSteps() {
  const principals = [
    getPrincipal("http://example.com", {}),
    getPrincipal("http://example.com", { privateBrowsingId: 1 }),
  ];

  async function isPreloaded(principal) {
    return Services.domStorageManager.isPreloaded(principal);
  }

  info("Setting prefs");

  Services.prefs.setBoolPref(
    "dom.storage.enable_unsupported_legacy_implementation",
    false
  );
  Services.prefs.setBoolPref("dom.storage.snapshot_reusing"false);

  for (const principal of principals) {
    info("Getting storage");

    let storage = getLocalStorage(principal);

    ok(
      !(await isPreloaded(principal)),
      "Data is not preloaded after getting storage"
    );

    info("Opening storage");

    storage.open();

    ok(await isPreloaded(principal), "Data is preloaded after opening storage");

    info("Closing storage");

    storage.close();

    if (principal.privateBrowsingId > 0) {
      ok(
        await isPreloaded(principal),
        "Data is still preloaded after closing storage"
      );

      info("Closing private session");

      Services.obs.notifyObservers(null"last-pb-context-exited");

      ok(
        !(await isPreloaded(principal)),
        "Data is not preloaded anymore after closing private session"
      );
    } else {
      ok(
        !(await isPreloaded(principal)),
        "Data is not preloaded anymore after closing storage"
      );
    }

    info("Opening storage again");

    storage.open();

    ok(
      await isPreloaded(principal),
      "Data is preloaded after opening storage again"
    );

    info("Clearing origin");

    let request = clearOrigin(
      principal,
      principal.privateBrowsingId > 0 ? "private" : "default"
    );
    await requestFinished(request);

    ok(
      !(await isPreloaded(principal)),
      "Data is not preloaded after clearing origin"
    );
  }
});

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

¤ 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002