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

Quelle  browser_jsonview_nojs.js   Sprache: JAVA

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


"use strict";

add_task(async function () {
  info("Test JSON without JavaScript started.");

  const oldPref = Services.prefs.getBoolPref("javascript.enabled");
  Services.prefs.setBoolPref("javascript.enabled"false);

  const TEST_JSON_URL = "data:application/json,[1,2,3]";

  // "uninitialized" will be the last app readyState because JS is disabled.
  await addJsonViewTab(TEST_JSON_URL, { appReadyState: "uninitialized" });

  info("Checking visible text contents.");

  const text = await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
    const element = content.document.querySelector("html");
    return element ? element.innerText : null;
  });
  is(text, "[1,2,3]""The raw source should be visible.");

  Services.prefs.setBoolPref("javascript.enabled", oldPref);
});

95%


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