зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1747561 - fix intermittents in browser_open_internal_choice_persistence.js by enforcing which window is active, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D139325
This commit is contained in:
Родитель
72a1b5cd91
Коммит
42b2e23515
|
@ -187,6 +187,10 @@ add_task(async function test_check_saving_handler_choices() {
|
|||
let doc = dialogWindow.document;
|
||||
let internalHandlerRadio = doc.querySelector("#handleInternally");
|
||||
|
||||
if (Services.focus.activeWindow != dialogWindow) {
|
||||
await BrowserTestUtils.waitForEvent(dialogWindow, "activate");
|
||||
}
|
||||
|
||||
await waitForAcceptButtonToGetEnabled(doc);
|
||||
|
||||
ok(!internalHandlerRadio.hidden, "The option should be visible for SVG");
|
||||
|
@ -221,8 +225,13 @@ add_task(async function test_check_saving_handler_choices() {
|
|||
|
||||
await testCase.dialogActions(doc);
|
||||
|
||||
let mainWindowActivatedAndFocused = Promise.all([
|
||||
BrowserTestUtils.waitForEvent(window, "activate"),
|
||||
BrowserTestUtils.waitForEvent(window, "focus", true),
|
||||
]);
|
||||
let dialog = doc.querySelector("#unknownContentType");
|
||||
dialog.acceptDialog();
|
||||
await mainWindowActivatedAndFocused;
|
||||
|
||||
let download = await downloadFinishedPromise;
|
||||
if (expectLaunch) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче