mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1177013 - Add-on install test changes (r=mrbkap)
This commit is contained in:
parent
671b16822e
commit
bf88274458
@ -287,15 +287,17 @@ var Harness = {
|
||||
if (this.finalContentEvent && !this.waitingForEvent) {
|
||||
this.waitingForEvent = true;
|
||||
info("Waiting for " + this.finalContentEvent);
|
||||
let mm = gBrowser.selectedBrowser.messageManager;
|
||||
mm.loadFrameScript(`data:,content.addEventListener("${this.finalContentEvent}", () => { sendAsyncMessage("Test:GotNewInstallEvent"); });`, false);
|
||||
let win = gBrowser.contentWindow;
|
||||
let listener = () => {
|
||||
info("Saw " + this.finalContentEvent);
|
||||
win.removeEventListener(this.finalContentEvent, listener, false);
|
||||
mm.removeMessageListener("Test:GotNewInstallEvent", listener);
|
||||
this.waitingForEvent = false;
|
||||
if (this.pendingCount == 0)
|
||||
this.endTest();
|
||||
}
|
||||
win.addEventListener(this.finalContentEvent, listener, false);
|
||||
mm.addMessageListener("Test:GotNewInstallEvent", listener);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user