Übersicht der Quellen

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

Benutzer

SSL test_stringLength2.js   Interaktion und
PortierbarkeitJAVA

 

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


/**
 * This test is mainly to verify that string length is correctly computed for
 * database values containing NULs. See bug 1541681.
 */


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

  const data = {};
  data.key = "foobar";
  data.secondKey = "foobaz";
  data.value = {
    length: 19253,
  };
  data.usage = data.key.length + data.value.length;

  async function checkUsage(expectedUsage) {
    info("Checking usage");

    // This forces any pending changes to be flushed to disk.  It also forces
    // data to be reloaded from disk at next localStorage API call.
    request = resetClient(principal);
    await requestFinished(request);

    request = getOriginUsage(principal);
    await requestFinished(request);

    is(request.result.usage, expectedUsage, "Correct usage");
  }

  info("Setting pref");

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

  info("Stage 1 - Checking usage after profile installation");

  info("Clearing");

  let request = clear();
  await requestFinished(request);

  info("Installing package");

  // The profile contains storage.sqlite and webappsstore.sqlite.
  installPackage("stringLength2_profile");

  await checkUsage(0);

  info("Stage 2 - Checking usage after archived data migration");

  info("Opening database");

  let storage = getLocalStorage(principal);
  storage.open();

  await checkUsage(data.usage);

  info("Stage 3 - Checking usage after copying the value");

  info("Adding a second copy of the value");

  let value = storage.getItem(data.key);
  storage.setItem(data.secondKey, value);

  await checkUsage(2 * data.usage);

  info("Stage 4 - Checking length of the copied value");

  value = storage.getItem(data.secondKey);
  Assert.strictEqual(value.length, data.value.length, "Correct string length");
});

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

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.19Angebot  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-30) ¤

*Eine klare Vorstellung vom Zielzustand






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

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....

Besucher

Besucher

Statistik
#Sources=1126864
#Domains=1897691