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

Quelle  test_removeLocalStorage.js   Sprache: JAVA

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


function* testSteps() {
  const lsArchiveFile = "storage/ls-archive.sqlite";
  const lsArchiveTmpFile = "storage/ls-archive-tmp.sqlite";
  const lsDir = "storage/default/http+++localhost/ls";

  info("Setting pref");

  SpecialPowers.setBoolPref(
    "dom.storage.enable_unsupported_legacy_implementation",
    true
  );

  // Profile 1
  info("Clearing");

  clear(continueToNextStepSync);
  yield undefined;

  info("Installing package");

  installPackage("removeLocalStorage1_profile");

  info("Checking ls archive tmp file");

  let archiveTmpFile = getRelativeFile(lsArchiveTmpFile);

  let exists = archiveTmpFile.exists();
  ok(exists, "ls archive tmp file does exist");

  info("Initializing");

  let request = init(continueToNextStepSync);
  yield undefined;

  Assert.equal(request.resultCode, NS_OK, "Initialization succeeded");

  info("Checking ls archive file");

  exists = archiveTmpFile.exists();
  ok(!exists, "ls archive tmp file doesn't exist");

  // Profile 2
  info("Clearing");

  clear(continueToNextStepSync);
  yield undefined;

  info("Installing package");

  installPackage("removeLocalStorage2_profile");

  info("Checking ls archive file");

  let archiveFile = getRelativeFile(lsArchiveFile);

  exists = archiveFile.exists();
  ok(exists, "ls archive file does exist");

  info("Checking ls dir");

  let dir = getRelativeFile(lsDir);

  exists = dir.exists();
  ok(exists, "ls directory does exist");

  info("Initializing");

  request = init(continueToNextStepSync);
  yield undefined;

  Assert.equal(request.resultCode, NS_OK, "Initialization succeeded");

  info("Checking ls archive file");

  exists = archiveFile.exists();
  ok(!exists, "ls archive file doesn't exist");

  info("Checking ls dir");

  exists = dir.exists();
  ok(!exists, "ls directory doesn't exist");

  finishTest();
}

Messung V0.5
C=97 H=90 G=93

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






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 und die Messung sind noch experimentell.