mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1155172 - Intermittent browser_webconsole_notifications.js; r=past
This commit is contained in:
parent
37ebb41477
commit
0966ca0b81
@ -8,14 +8,14 @@ const TEST_URI = "data:text/html;charset=utf-8,<p>Web Console test for notificat
|
||||
let test = asyncTest(function* () {
|
||||
yield loadTab(TEST_URI);
|
||||
|
||||
let gotEvents = waitForEvents();
|
||||
|
||||
let hud = yield openConsole();
|
||||
let consoleOpened = promise.defer();
|
||||
let gotEvents = waitForEvents(consoleOpened.promise);
|
||||
let hud = yield openConsole().then(() => consoleOpened.resolve());
|
||||
|
||||
yield gotEvents;
|
||||
});
|
||||
|
||||
function waitForEvents() {
|
||||
function waitForEvents(onConsoleOpened) {
|
||||
let deferred = promise.defer();
|
||||
|
||||
function webConsoleCreated(aID)
|
||||
@ -37,7 +37,7 @@ function waitForEvents() {
|
||||
Services.obs.removeObserver(observer, "web-console-message-created");
|
||||
ok(aID, "we have a console ID");
|
||||
is(typeof aNodeID, "string", "message node id is a string");
|
||||
executeSoon(closeConsole);
|
||||
onConsoleOpened.then(closeConsole);
|
||||
}
|
||||
|
||||
let observer = {
|
||||
|
Loading…
Reference in New Issue
Block a user