products/Sources/formale Sprachen/C/Firefox/third_party/msgpack/src/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 16 kB image not shown  

Quellcode-Bibliothek test_backupPrefFile.js

  Interaktion und
PortierbarkeitJAVA
 

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


"use strict";

/**
 * Tests that we can create a backup of the preferences state to
 * a file asynchronously.
 */

add_task(async function test_backupPrefFile() {
  // Create a backup of the preferences state to a file.
  Services.prefs.setBoolPref("test.backup"true);

  let backupFilePath = PathUtils.join(PathUtils.tempDir, "prefs-backup.js");
  let backupFile = await IOUtils.getFile(backupFilePath);
  await Services.prefs.backupPrefFile(backupFile);

  // Verify that the backup file was created and contains the expected content.
  let backupContent = await IOUtils.read(backupFilePath, { encoding: "utf-8" });

  let sawTestValue = false;

  // Now parse the backup file and verify that it contains the expected
  // preference value. We'll not worry about any of the other preferences.
  let observer = {
    onStringPref() {},
    onIntPref() {},
    onBoolPref(kind, name, value, _isSticky, _isLocked) {
      if (name == "test.backup" && value) {
        sawTestValue = true;
      }
    },
    onError(message) {
      Assert.ok(false"Error while parsing backup file: " + message);
    },
  };
  Services.prefs.parsePrefsFromBuffer(backupContent, observer);

  Assert.ok(
    sawTestValue,
    "The backup file contains the expected preference value."
  );

  // Clean up the backup file.
  await IOUtils.remove(backupFilePath);
});

Messung V0.5 in Prozent
C=89 H=94 G=91

¤ 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.0.12Bemerkung:  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-07) ¤

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