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

Quelle  test_clientValidation.js   Sprache: JAVA

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


/**
 * Because this is an xpcshell global, it does not have an associated client id.
 * We turn on client validation for LocalStorage and ensure that we don't have
 * access to LocalStorage.
 */

add_task(async function testSteps() {
  const principal = getPrincipal("http://example.com");

  info("Setting prefs");

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

  info("Getting storage");

  try {
    getLocalStorage(principal);
    ok(false"Should have thrown");
  } catch (ex) {
    ok(true"Did throw");
    is(ex.name, "NS_ERROR_FAILURE""Threw right Exception");
    is(ex.result, Cr.NS_ERROR_FAILURE, "Threw with right result");
  }
});

Messung V0.5
C=92 H=100 G=95

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