diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js')
-rw-r--r-- | toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js b/toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js index 4269020975..e50e9bee0e 100644 --- a/toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js +++ b/toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js @@ -312,7 +312,7 @@ decorate_task( // clearAllExperimentStorage decorate_task( withMockExperiments([preferenceStudyFactory({ slug: "test" })]), - async function ({ prefExperiments }) { + async function () { ok(await PreferenceExperiments.has("test"), "Mock experiment is detected."); await PreferenceExperiments.clearAllExperimentStorage(); ok( @@ -434,12 +434,7 @@ decorate_task( withMockPreferences(), withStub(PreferenceExperiments, "startObserver"), withSendEventSpy(), - async function testStart({ - prefExperiments, - mockPreferences, - startObserverStub, - sendEventSpy, - }) { + async function testStart({ mockPreferences, startObserverStub }) { mockPreferences.set("fake.preference", "oldvalue", "default"); mockPreferences.set("fake.preference", "uservalue", "user"); mockPreferences.set("fake.preferenceinteger", 1, "default"); @@ -1193,7 +1188,7 @@ decorate_task(withMockExperiments(), async function () { // get decorate_task( withMockExperiments([preferenceStudyFactory({ slug: "test" })]), - async function ({ prefExperiments }) { + async function () { const experiment = await PreferenceExperiments.get("test"); is(experiment.slug, "test", "get fetches the correct experiment"); @@ -1253,9 +1248,7 @@ decorate_task( }), ]), withMockPreferences(), - async function testGetAllActive({ - prefExperiments: [activeExperiment, inactiveExperiment], - }) { + async function testGetAllActive({ prefExperiments: [activeExperiment] }) { let allActiveExperiments = await PreferenceExperiments.getAllActive(); Assert.deepEqual( allActiveExperiments, @@ -1306,11 +1299,7 @@ decorate_task( withMockPreferences(), withStub(TelemetryEnvironment, "setExperimentActive"), withStub(PreferenceExperiments, "startObserver"), - async function testInit({ - prefExperiments, - mockPreferences, - setExperimentActiveStub, - }) { + async function testInit({ mockPreferences, setExperimentActiveStub }) { mockPreferences.set("fake.pref", "experiment value"); await PreferenceExperiments.init(); ok( |