summaryrefslogtreecommitdiffstats
path: root/dom/security/test/https-first/browser_schemeless.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/security/test/https-first/browser_schemeless.js')
-rw-r--r--dom/security/test/https-first/browser_schemeless.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/dom/security/test/https-first/browser_schemeless.js b/dom/security/test/https-first/browser_schemeless.js
index 9687f15072..64b078983d 100644
--- a/dom/security/test/https-first/browser_schemeless.js
+++ b/dom/security/test/https-first/browser_schemeless.js
@@ -153,6 +153,7 @@ async function runTest(aInput, aDesc, aExpectedScheme) {
add_task(async function () {
requestLongerTimeout(10);
+ Services.fog.testResetFOG();
await SpecialPowers.pushPrefEnv({
set: [
@@ -183,9 +184,36 @@ add_task(async function () {
"http"
);
+ for (const key of [
+ "upgraded",
+ "upgradedSchemeless",
+ "downgraded",
+ "downgradedSchemeless",
+ "downgradedOnTimer",
+ "downgradedOnTimerSchemeless",
+ "downgradeTime",
+ "downgradeTimeSchemeless",
+ ]) {
+ is(
+ Glean.httpsfirst[key].testGetValue(),
+ null,
+ `No telemetry should have been recorded yet for ${key}`
+ );
+ }
+
await runTest(
"example.com",
"Should upgrade upgradeable website without explicit scheme",
"https"
);
+
+ info("Checking expected telemetry");
+ is(Glean.httpsfirst.upgraded.testGetValue(), null);
+ is(Glean.httpsfirst.upgradedSchemeless.testGetValue(), 5);
+ is(Glean.httpsfirst.downgraded.testGetValue(), null);
+ is(Glean.httpsfirst.downgradedSchemeless.testGetValue(), null);
+ is(Glean.httpsfirst.downgradedOnTimer.testGetValue(), null);
+ is(Glean.httpsfirst.downgradedOnTimerSchemeless.testGetValue(), null);
+ is(Glean.httpsfirst.downgradeTime.testGetValue(), null);
+ is(Glean.httpsfirst.downgradeTimeSchemeless.testGetValue(), null);
});