mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 738287 - Make browser_pdfjs_main.js correctly wait for the add-ons manager API callback.
r=ttaubert
This commit is contained in:
parent
262609cd3f
commit
17e9213595
@ -15,12 +15,16 @@ function test() {
|
||||
registerCleanupFunction(function() {
|
||||
aAddon.userDisabled = true;
|
||||
});
|
||||
});
|
||||
|
||||
continueTest();
|
||||
});
|
||||
}
|
||||
|
||||
function continueTest() {
|
||||
var tab = gBrowser.addTab(TESTROOT + "file_pdfjs_test.pdf");
|
||||
var newTabBrowser = gBrowser.getBrowserForTab(tab);
|
||||
newTabBrowser.addEventListener("load", function () {
|
||||
newTabBrowser.removeEventListener("load", arguments.callee, true);
|
||||
newTabBrowser.addEventListener("load", function onLoad() {
|
||||
newTabBrowser.removeEventListener("load", onLoad, true);
|
||||
|
||||
var hasViewer = newTabBrowser.contentDocument.querySelector('div#viewer');
|
||||
var hasPDFJS = 'PDFJS' in newTabBrowser.contentWindow.wrappedJSObject;
|
||||
|
Loading…
Reference in New Issue
Block a user