зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1167915 - followup: avoid modal dialog potentially blocking the test. r=ttaubert
This commit is contained in:
Родитель
e6d9440959
Коммит
0dcde6b855
|
@ -10,9 +10,7 @@ add_task(function* () {
|
||||||
// We must wait for the context menu code to build metadata.
|
// We must wait for the context menu code to build metadata.
|
||||||
yield openContextMenuForContentSelector(browser, 'form > input[name="search"]');
|
yield openContextMenuForContentSelector(browser, 'form > input[name="search"]');
|
||||||
|
|
||||||
yield withBookmarksDialog(function*() {
|
yield withBookmarksDialog(AddKeywordForSearchField, function* (dialogWin) {
|
||||||
AddKeywordForSearchField();
|
|
||||||
}, function* (dialogWin) {
|
|
||||||
let acceptBtn = dialogWin.document.documentElement.getButton("accept");
|
let acceptBtn = dialogWin.document.documentElement.getButton("accept");
|
||||||
ok(acceptBtn.disabled, "Accept button is disabled");
|
ok(acceptBtn.disabled, "Accept button is disabled");
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,9 @@ let withBookmarksDialog = Task.async(function* (openFn, taskFn) {
|
||||||
});
|
});
|
||||||
|
|
||||||
info("withBookmarksDialog: opening the dialog");
|
info("withBookmarksDialog: opening the dialog");
|
||||||
yield openFn();
|
// The dialog might be modal and could block our events loop, so executeSoon.
|
||||||
|
executeSoon(openFn);
|
||||||
|
|
||||||
info("withBookmarksDialog: waiting for the dialog");
|
info("withBookmarksDialog: waiting for the dialog");
|
||||||
let dialogWin = yield dialogPromise;
|
let dialogWin = yield dialogPromise;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче