forked from mirrors/gecko-dev
Backed out changeset ac717cd03a6b (bug 1673962) for causing failures in browser_experimental_features_restart_required_cancel.js
This commit is contained in:
parent
b13291edfd
commit
9d8148ba43
2 changed files with 0 additions and 48 deletions
|
|
@ -21,7 +21,6 @@ skip-if = !updater
|
||||||
[browser_experimental_features_filter.js]
|
[browser_experimental_features_filter.js]
|
||||||
[browser_experimental_features_hidden_when_not_public.js]
|
[browser_experimental_features_hidden_when_not_public.js]
|
||||||
[browser_experimental_features_resetall.js]
|
[browser_experimental_features_resetall.js]
|
||||||
[browser_experimental_features_restart_required_cancel.js]
|
|
||||||
[browser_filetype_dialog.js]
|
[browser_filetype_dialog.js]
|
||||||
[browser_search_no_results_change_category.js]
|
[browser_search_no_results_change_category.js]
|
||||||
[browser_search_within_preferences_1.js]
|
[browser_search_within_preferences_1.js]
|
||||||
|
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
/* Any copyright is dedicated to the Public Domain.
|
|
||||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
add_task(async function testInfiniteCancelLoop() {
|
|
||||||
await SpecialPowers.pushPrefEnv({
|
|
||||||
set: [["browser.preferences.experimental", true]],
|
|
||||||
});
|
|
||||||
|
|
||||||
const server = new DefinitionServer();
|
|
||||||
server.addDefinition({
|
|
||||||
id: "test-featureA",
|
|
||||||
isPublic: true,
|
|
||||||
preference: "test.feature.a",
|
|
||||||
restartRequired: true,
|
|
||||||
});
|
|
||||||
await BrowserTestUtils.openNewForegroundTab(
|
|
||||||
gBrowser,
|
|
||||||
`about:preferences?definitionsUrl=${encodeURIComponent(
|
|
||||||
server.definitionsUrl
|
|
||||||
)}#paneExperimental`
|
|
||||||
);
|
|
||||||
let doc = gBrowser.contentDocument;
|
|
||||||
|
|
||||||
// Trigger and cancel a feature that has restart-required=true to make
|
|
||||||
// sure that we don't enter an infinite loop of prompts.
|
|
||||||
let featureCheckbox = doc.getElementById("test-featureA");
|
|
||||||
ok(featureCheckbox, "Checkbox should exist");
|
|
||||||
let newWindowPromise = BrowserTestUtils.domWindowOpened();
|
|
||||||
featureCheckbox.click();
|
|
||||||
|
|
||||||
let restartWin = await newWindowPromise;
|
|
||||||
let dialog = await TestUtils.waitForCondition(() =>
|
|
||||||
restartWin.document.querySelector(`dialog`)
|
|
||||||
);
|
|
||||||
let cancelButton = dialog.shadowRoot.querySelector(`[dlgtype="cancel"]`);
|
|
||||||
ok(cancelButton, "Cancel button should exist in dialog");
|
|
||||||
let windowClosedPromise = BrowserTestUtils.domWindowClosed(restartWin);
|
|
||||||
cancelButton.click();
|
|
||||||
await windowClosedPromise;
|
|
||||||
|
|
||||||
// If a new prompt is opened then the test should fail since
|
|
||||||
// the prompt window will have leaked.
|
|
||||||
|
|
||||||
BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
|
||||||
});
|
|
||||||
Loading…
Reference in a new issue