Bug 1167915 - followup: avoid modal dialog potentially blocking the test. r=ttaubert

This commit is contained in:
Marco Bonardo 2015-06-08 17:06:00 +02:00
Родитель e6d9440959
Коммит 0dcde6b855
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -10,9 +10,7 @@ add_task(function* () {
// We must wait for the context menu code to build metadata.
yield openContextMenuForContentSelector(browser, 'form > input[name="search"]');
yield withBookmarksDialog(function*() {
AddKeywordForSearchField();
}, function* (dialogWin) {
yield withBookmarksDialog(AddKeywordForSearchField, function* (dialogWin) {
let acceptBtn = dialogWin.document.documentElement.getButton("accept");
ok(acceptBtn.disabled, "Accept button is disabled");

Просмотреть файл

@ -310,7 +310,9 @@ let withBookmarksDialog = Task.async(function* (openFn, taskFn) {
});
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");
let dialogWin = yield dialogPromise;