Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/devtools/shared/tests/xpcshell/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 954 B image not shown  

Quelle  test_fetch-chrome.js   Sprache: JAVA

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

"use strict";

// Tests for DevToolsUtils.fetch on chrome:// URI's.

const URL_FOUND = "chrome://devtools-shared/locale/debugger.properties";
const URL_NOT_FOUND = "chrome://this/is/not/here.js";

/**
 * Test that non-existent files are handled correctly.
 */

add_task(async function test_missing() {
  await DevToolsUtils.fetch(URL_NOT_FOUND).then(
    result => {
      info(result);
      ok(false"fetch resolved unexpectedly for non-existent chrome:// URI");
    },
    () => {
      ok(true"fetch rejected as the chrome:// URI was non-existent.");
    }
  );
});

/**
 * Tests that existing files are handled correctly.
 */

add_task(async function test_normal() {
  await DevToolsUtils.fetch(URL_FOUND).then(result => {
    notDeepEqual(
      result.content,
      "",
      "chrome:// URI seems to be read correctly."
    );
  });
});

95%


¤ Dauer der Verarbeitung: 0.14 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 ist noch experimentell.