Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Impressum test_policy.js   Sprache: unbekannt

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


"use strict";

const { EnterprisePolicyTesting } = ChromeUtils.importESModule(
  "resource://testing-common/EnterprisePolicyTesting.sys.mjs"
);

add_setup(function setup() {
  // Instantiate the enterprise policy service.
  void Cc["@mozilla.org/enterprisepolicies;1"].getService(Ci.nsIObserver);
});

add_task(async function testPolicyDisablesNimbus() {
  info("Enabling policy");
  await EnterprisePolicyTesting.setupPolicyEngineWithJson({
    policies: {
      DisableFirefoxStudies: true,
    },
  });

  info("Is policy engine active?");
  Assert.equal(
    Services.policies.status,
    Ci.nsIEnterprisePolicies.ACTIVE,
    "Policy engine is active"
  );

  const manager = ExperimentFakes.manager();
  await manager.onStartup();

  Assert.ok(!manager.studiesEnabled, "ExperimentManager is disabled");

  const loader = ExperimentFakes.rsLoader();
  loader.manager = manager;

  const setTimerStub = sinon.stub(loader, "setTimer");
  const updateRecipes = sinon.stub(loader, "updateRecipes");

  await loader.init();

  Assert.ok(
    !loader._initialized,
    "RemoteSettingsExperimentLoader not initailized"
  );
  Assert.ok(
    setTimerStub.notCalled,
    "RemoteSettingsExperimentLoader not polling for recipes"
  );
  Assert.ok(
    updateRecipes.notCalled,
    "RemoteSettingsExperimentLoader not updating recipes after startup"
  );
});

Messung V0.5 in Prozent
C=99 H=93 G=95

[Seitenstruktur0.5Druckenetwas mehr zur Ethik2026-06-05]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik