diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /browser/extensions/pdfjs/test/head.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'browser/extensions/pdfjs/test/head.js')
-rw-r--r-- | browser/extensions/pdfjs/test/head.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/browser/extensions/pdfjs/test/head.js b/browser/extensions/pdfjs/test/head.js new file mode 100644 index 000000000..d980bceb1 --- /dev/null +++ b/browser/extensions/pdfjs/test/head.js @@ -0,0 +1,15 @@ +function waitForPdfJS(browser, url) { + // Runs tests after all 'load' event handlers have fired off + return ContentTask.spawn(browser, url, function* (url) { + yield new Promise((resolve) => { + // NB: Add the listener to the global object so that we receive the + // event fired from the new window. + addEventListener("documentload", function listener() { + removeEventListener("documentload", listener, false); + resolve(); + }, false, true); + + content.location = url; + }); + }); +} |