Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
bug 613545: after each context menu test, wait until the context menu…
Browse files Browse the repository at this point in the history
… popup is hidden before moving on to the next test; r=adw, a=self
  • Loading branch information
mykmelez committed Nov 19, 2010
1 parent f70023e commit 2391f25
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions packages/addon-kit/tests/test-context-menu.js
Expand Up @@ -1280,17 +1280,27 @@ TestHelper.prototype = {
this.test.done();
}

this.contextMenuPopup.hidePopup();
function closeBrowserWindow() {
if (this.oldBrowserWindow) {
this.delayedEventListener(this.browserWindow, "unload", commonDone,
false);
this.browserWindow.close();
this.browserWindow = this.oldBrowserWindow;
delete this.oldBrowserWindow;
}
else {
commonDone.call(this);
}
};

if (this.oldBrowserWindow) {
this.delayedEventListener(this.browserWindow, "unload", commonDone,
false);
this.browserWindow.close();
this.browserWindow = this.oldBrowserWindow;
delete this.oldBrowserWindow;
if (this.contextMenuPopup.state == "closed") {
closeBrowserWindow.call(this);
}
else {
commonDone.call(this);
this.delayedEventListener(this.contextMenuPopup, "popuphidden",
function () closeBrowserWindow.call(this),
false);
this.contextMenuPopup.hidePopup();
}
},

Expand Down

0 comments on commit 2391f25

Please sign in to comment.