Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/toolkit/components/search/tests/xpcshell/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  test_async.js   Sprache: JAVA

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


const CONFIG = [{ identifier: "engine-1" }, { identifier: "engine-2" }];

add_setup(async function () {
  SearchTestUtils.setRemoteSettingsConfig(CONFIG);
  Services.fog.initializeFOG();
});

add_task(async function test_async() {
  Assert.ok(!Services.search.isInitialized);

  let aStatus = await Services.search.init();
  Assert.ok(Components.isSuccessCode(aStatus));
  Assert.ok(Services.search.isInitialized);

  // test engines from dir are not loaded.
  let engines = await Services.search.getEngines();
  Assert.equal(engines.length, 2);

  // test jar engine is loaded ok.
  let engine = Services.search.getEngineByName("engine-1");
  Assert.notEqual(engine, null);
  Assert.ok(engine.isAppProvided, "Should be shown as an app-provided engine");

  engine = Services.search.getEngineByName("engine-2");
  Assert.notEqual(engine, null);
  Assert.ok(engine.isAppProvided, "Should be shown as an app-provided engine");

  // Check if there is a value for startup_time
  Assert.notEqual(
    await Glean.searchService.startupTime.testGetValue(),
    undefined,
    "Should have a value stored in startup_time"
  );
});

Messung V0.5
C=95 H=96 G=95

¤ Dauer der Verarbeitung: 0.9 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 und die Messung sind noch experimentell.