summaryrefslogtreecommitdiffstats
path: root/toolkit/components/webextensions/test/xpcshell/test_ext_background_sub_windows.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/webextensions/test/xpcshell/test_ext_background_sub_windows.js')
-rw-r--r--toolkit/components/webextensions/test/xpcshell/test_ext_background_sub_windows.js45
1 files changed, 0 insertions, 45 deletions
diff --git a/toolkit/components/webextensions/test/xpcshell/test_ext_background_sub_windows.js b/toolkit/components/webextensions/test/xpcshell/test_ext_background_sub_windows.js
deleted file mode 100644
index c5f2f1332..000000000
--- a/toolkit/components/webextensions/test/xpcshell/test_ext_background_sub_windows.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-add_task(function* testBackgroundWindow() {
- let extension = ExtensionTestUtils.loadExtension({
- background() {
- browser.test.log("background script executed");
-
- browser.test.sendMessage("background-script-load");
-
- let img = document.createElement("img");
- img.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
- document.body.appendChild(img);
-
- img.onload = () => {
- browser.test.log("image loaded");
-
- let iframe = document.createElement("iframe");
- iframe.src = "about:blank?1";
-
- iframe.onload = () => {
- browser.test.log("iframe loaded");
- setTimeout(() => {
- browser.test.notifyPass("background sub-window test done");
- }, 0);
- };
- document.body.appendChild(iframe);
- };
- },
- });
-
- let loadCount = 0;
- extension.onMessage("background-script-load", () => {
- loadCount++;
- });
-
- yield extension.startup();
-
- yield extension.awaitFinish("background sub-window test done");
-
- equal(loadCount, 1, "background script loaded only once");
-
- yield extension.unload();
-});