summaryrefslogtreecommitdiffstats
path: root/toolkit/components/webextensions/test/mochitest/head.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/webextensions/test/mochitest/head.js')
-rw-r--r--toolkit/components/webextensions/test/mochitest/head.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/toolkit/components/webextensions/test/mochitest/head.js b/toolkit/components/webextensions/test/mochitest/head.js
new file mode 100644
index 000000000..1b1a29472
--- /dev/null
+++ b/toolkit/components/webextensions/test/mochitest/head.js
@@ -0,0 +1,13 @@
+"use strict";
+
+/* exported waitForLoad */
+
+function waitForLoad(win) {
+ return new Promise(resolve => {
+ win.addEventListener("load", function listener() {
+ win.removeEventListener("load", listener, true);
+ resolve();
+ }, true);
+ });
+}
+