diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /browser/base/content/test/about | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/test/about')
-rw-r--r-- | browser/base/content/test/about/browser.toml | 10 | ||||
-rw-r--r-- | browser/base/content/test/about/browser_aboutNetError.js | 44 |
2 files changed, 51 insertions, 3 deletions
diff --git a/browser/base/content/test/about/browser.toml b/browser/base/content/test/about/browser.toml index 900c6b7140..98961200a0 100644 --- a/browser/base/content/test/about/browser.toml +++ b/browser/base/content/test/about/browser.toml @@ -34,7 +34,8 @@ support-files = [ ["browser_aboutHome_search_suggestion.js"] skip-if = [ "os == 'mac'", - "os == 'linux' && (!debug || bits == 64)", + "os == 'linux' && os_version == '18.04' && !debug", + "os == 'linux' && os_version == '18.04' && bits == 64", "win10_2009 && bits == 64 && !debug", # Bug 1399648, bug 1402502 ] @@ -75,7 +76,7 @@ skip-if = ["tsan"] # Bug 1676326, highly frequent on TSan ["browser_aboutStopReload.js"] ["browser_aboutSupport.js"] -skip-if = ["os == 'linux' && bits == 64 && asan && !debug"] # Bug 1713368 +skip-if = ["os == 'linux' && os_version == '18.04' && asan"] # Bug 1713368 ["browser_aboutSupport_newtab_security_state.js"] @@ -83,6 +84,9 @@ skip-if = ["os == 'linux' && bits == 64 && asan && !debug"] # Bug 1713368 skip-if = ["os == 'android'"] ["browser_bug435325.js"] -skip-if = ["verify && !debug && os == 'mac'"] +skip-if = [ + "apple_catalina && !debug && verify", + "apple_silicon && !debug && verify", +] ["browser_bug633691.js"] diff --git a/browser/base/content/test/about/browser_aboutNetError.js b/browser/base/content/test/about/browser_aboutNetError.js index 8222a0f6e8..9131f5e696 100644 --- a/browser/base/content/test/about/browser_aboutNetError.js +++ b/browser/base/content/test/about/browser_aboutNetError.js @@ -25,6 +25,38 @@ function resetPrefs() { Services.prefs.clearUserPref("browser.fixup.alternate.enabled"); } +async function resetTelemetry() { + Services.telemetry.clearEvents(); + await TestUtils.waitForCondition(() => { + let events = Services.telemetry.snapshotEvents( + Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS, + true + ).content; + return !events || !events.length; + }); + Services.telemetry.setEventRecordingEnabled("security.ui.tlserror", true); +} + +async function checkTelemetry(errorString) { + let loadEvent = await TestUtils.waitForCondition(() => { + let events = Services.telemetry.snapshotEvents( + Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS, + true + ).content; + return events?.find(e => e[1] == "security.ui.tlserror" && e[2] == "load"); + }, "recorded telemetry for the load"); + loadEvent.shift(); + Assert.deepEqual(loadEvent, [ + "security.ui.tlserror", + "load", + "abouttlserror", + errorString, + { + is_frame: "false", + }, + ]); +} + add_task(async function resetToDefaultConfig() { info( "Change TLS config to cause page load to fail, check that reset button is shown and that it works" @@ -34,6 +66,8 @@ add_task(async function resetToDefaultConfig() { Services.prefs.setIntPref("security.tls.version.min", 1); // TLS 1.0 Services.prefs.setIntPref("security.tls.version.max", 1); + await resetTelemetry(); + let browser; let pageLoaded; await BrowserTestUtils.openNewForegroundTab( @@ -49,6 +83,8 @@ add_task(async function resetToDefaultConfig() { info("Loading and waiting for the net error"); await pageLoaded; + await checkTelemetry("SSL_ERROR_PROTOCOL_VERSION_ALERT"); + // Setup an observer for the target page. const finalLoadComplete = BrowserTestUtils.browserLoaded( browser, @@ -92,6 +128,8 @@ add_task(async function checkLearnMoreLink() { Services.prefs.setIntPref("security.tls.version.min", 3); Services.prefs.setIntPref("security.tls.version.max", 4); + await resetTelemetry(); + let browser; let pageLoaded; await BrowserTestUtils.openNewForegroundTab( @@ -107,6 +145,8 @@ add_task(async function checkLearnMoreLink() { info("Loading and waiting for the net error"); await pageLoaded; + await checkTelemetry("SSL_ERROR_PROTOCOL_VERSION_ALERT"); + const baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL"); await SpecialPowers.spawn(browser, [baseURL], function (_baseURL) { @@ -206,6 +246,8 @@ add_task(async function checkDomainCorrection() { // Test that ciphersuites that use 3DES (namely, TLS_RSA_WITH_3DES_EDE_CBC_SHA) // can only be enabled when deprecated TLS is enabled. add_task(async function onlyAllow3DESWithDeprecatedTLS() { + await resetTelemetry(); + // By default, connecting to a server that only uses 3DES should fail. await BrowserTestUtils.withNewTab( { gBrowser, url: "about:blank" }, @@ -215,6 +257,8 @@ add_task(async function onlyAllow3DESWithDeprecatedTLS() { } ); + await checkTelemetry("SSL_ERROR_NO_CYPHER_OVERLAP"); + // Enabling deprecated TLS should also enable 3DES. Services.prefs.setBoolPref("security.tls.version.enable-deprecated", true); await BrowserTestUtils.withNewTab( |