Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/xpconnect/tests/unit/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  test_import_stack.js

  Sprache: JAVA
 

Services.prefs.setBoolPref("browser.startup.record"true);
registerCleanupFunction(() => {
  Services.prefs.clearUserPref("browser.startup.record");
});

add_task(function test_ESModule() {
  const URL = "resource://test/import_stack.sys.mjs";
  ChromeUtils.importESModule(URL);
  Assert.ok(Cu.getModuleImportStack(URL).includes("test_ESModule"));
});

add_task(function test_ESModule_static_import() {
  const URL1 = "resource://test/import_stack_static_1.sys.mjs";
  const URL2 = "resource://test/import_stack_static_2.sys.mjs";
  const URL3 = "resource://test/import_stack_static_3.sys.mjs";
  const URL4 = "resource://test/import_stack_static_4.sys.mjs";

  ChromeUtils.importESModule(URL1);

  Assert.ok(Cu.getModuleImportStack(URL1).includes("test_ESModule_static"));

  Assert.ok(Cu.getModuleImportStack(URL2).includes("test_ESModule_static"));
  Assert.ok(Cu.getModuleImportStack(URL2).includes(URL1));

  Assert.ok(Cu.getModuleImportStack(URL3).includes("test_ESModule_static"));
  Assert.ok(Cu.getModuleImportStack(URL3).includes(URL1));
  Assert.ok(Cu.getModuleImportStack(URL3).includes(URL2));

  Assert.ok(Cu.getModuleImportStack(URL4).includes("test_ESModule_static"));
  Assert.ok(Cu.getModuleImportStack(URL4).includes(URL1));
  Assert.ok(Cu.getModuleImportStack(URL4).includes(URL2));
  Assert.ok(Cu.getModuleImportStack(URL4).includes(URL3));
});

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

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






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.