Backed out changeset 71746bb87230 (bug 1858223) for causing marionette in test_no_errors_clean_profile.py CLOSED TREE

This commit is contained in:
Cristian Tuns 2023-10-17 13:42:36 -04:00
parent 0d4810205e
commit 009a937f2e
4 changed files with 8 additions and 69 deletions

View file

@ -90,7 +90,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
UIState: "resource://services-sync/UIState.sys.mjs",
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
WebChannel: "resource://gre/modules/WebChannel.sys.mjs",
WindowsLaunchOnLogin: "resource://gre/modules/WindowsLaunchOnLogin.sys.mjs",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
WindowsGPOParser: "resource://gre/modules/policies/WindowsGPOParser.sys.mjs",
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
@ -1239,25 +1238,6 @@ BrowserGlue.prototype = {
"os-autostart",
false
);
let launchOnLoginPref = "browser.startup.windowsLaunchOnLogin.enabled";
let profileSvc = Cc[
"@mozilla.org/toolkit/profile-service;1"
].getService(Ci.nsIToolkitProfileService);
if (
Services.prefs.getBoolPref(launchOnLoginPref) &&
!profileSvc.startWithLastProfile
) {
// If we don't start with last profile, the user
// likely sees the profile selector on launch.
Services.prefs.setBoolPref(launchOnLoginPref, false);
Services.telemetry.setEventRecordingEnabled("launch_on_login", true);
Services.telemetry.recordEvent(
"launch_on_login",
"last_profile_disable:",
"startup"
);
await lazy.WindowsLaunchOnLogin.removeLaunchOnLoginRegistryKey();
}
break;
}
},

View file

@ -10,20 +10,14 @@ ChromeUtils.defineESModuleGetters(this, {
WindowsLaunchOnLogin: "resource://gre/modules/WindowsLaunchOnLogin.sys.mjs",
});
const { ExperimentAPI } = ChromeUtils.importESModule(
"resource://nimbus/ExperimentAPI.sys.mjs"
);
const { ExperimentFakes } = ChromeUtils.importESModule(
"resource://testing-common/NimbusTestUtils.sys.mjs"
);
add_setup(async function () {
// Ensure checkbox is enabled before running tests
await SpecialPowers.pushPrefEnv({
set: [["browser.startup.windowsLaunchOnLogin.enabled", true]],
});
});
add_task(async function test_check_checkbox() {
await ExperimentAPI.ready();
let doCleanup = await ExperimentFakes.enrollWithFeatureConfig({
featureId: "windowsLaunchOnLogin",
value: { enabled: true },
});
await WindowsLaunchOnLogin.withLaunchOnLoginRegistryKey(async wrk => {
// Open preferences to general pane
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {
@ -42,15 +36,9 @@ add_task(async function test_check_checkbox() {
gBrowser.removeCurrentTab();
});
await doCleanup();
});
add_task(async function test_uncheck_checkbox() {
await ExperimentAPI.ready();
let doCleanup = await ExperimentFakes.enrollWithFeatureConfig({
featureId: "windowsLaunchOnLogin",
value: { enabled: true },
});
await WindowsLaunchOnLogin.withLaunchOnLoginRegistryKey(async wrk => {
// Open preferences to general pane
await openPreferencesViaOpenPreferencesAPI("paneGeneral", {
@ -69,15 +57,9 @@ add_task(async function test_uncheck_checkbox() {
gBrowser.removeCurrentTab();
});
await doCleanup();
});
add_task(async function create_external_regkey() {
await ExperimentAPI.ready();
let doCleanup = await ExperimentFakes.enrollWithFeatureConfig({
featureId: "windowsLaunchOnLogin",
value: { enabled: true },
});
await WindowsLaunchOnLogin.withLaunchOnLoginRegistryKey(async wrk => {
// Create registry key without using settings pane to check if
// this is reflected in the settings
@ -104,15 +86,9 @@ add_task(async function create_external_regkey() {
gBrowser.removeCurrentTab();
});
await doCleanup();
});
add_task(async function delete_external_regkey() {
await ExperimentAPI.ready();
let doCleanup = await ExperimentFakes.enrollWithFeatureConfig({
featureId: "windowsLaunchOnLogin",
value: { enabled: true },
});
await WindowsLaunchOnLogin.withLaunchOnLoginRegistryKey(async wrk => {
// Delete registry key without using settings pane to check if
// this is reflected in the settings
@ -132,10 +108,10 @@ add_task(async function delete_external_regkey() {
gBrowser.removeCurrentTab();
});
await doCleanup();
});
registerCleanupFunction(async function () {
await SpecialPowers.popPrefEnv();
await WindowsLaunchOnLogin.withLaunchOnLoginRegistryKey(async wrk => {
let registryName = WindowsLaunchOnLogin.getLaunchOnLoginRegistryName();
if (wrk.hasValue(registryName)) {

View file

@ -514,7 +514,7 @@ windowsLaunchOnLogin:
variables:
enabled:
type: boolean
setPref: browser.startup.windowsLaunchOnLogin.enabled
fallbackPref: browser.startup.windowsLaunchOnLogin.enabled
description: Should users see the Windows launch on login checkbox.
abouthomecache:

View file

@ -2983,23 +2983,6 @@ pictureinpicture.settings:
expiry_version: "never"
release_channel_collection: opt-out
launch_on_login:
last_profile_disable:
objects: ["startup"]
description: >
Recorded when Launch on login is disabled because the
start with last profile setting has been disabled.
notification_emails:
- nalexander@mozilla.com
products:
- "firefox"
record_in_processes:
- main
bug_numbers:
- 1858223
expiry_version: "never"
release_channel_collection: opt-out
doh:
evaluate_v2:
methods: ["evaluate_v2"]