summaryrefslogtreecommitdiffstats
path: root/toolkit/components/webextensions/test/mochitest/test_ext_sandbox_var.html
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/webextensions/test/mochitest/test_ext_sandbox_var.html')
-rw-r--r--toolkit/components/webextensions/test/mochitest/test_ext_sandbox_var.html60
1 files changed, 0 insertions, 60 deletions
diff --git a/toolkit/components/webextensions/test/mochitest/test_ext_sandbox_var.html b/toolkit/components/webextensions/test/mochitest/test_ext_sandbox_var.html
deleted file mode 100644
index 426a71ac6..000000000
--- a/toolkit/components/webextensions/test/mochitest/test_ext_sandbox_var.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for content script</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/ExtensionTestUtils.js"></script>
- <script type="text/javascript" src="head.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
-<script type="text/javascript">
-"use strict";
-
-function background() {
- browser.runtime.onMessage.addListener(result => {
- browser.test.assertEq(result, 12, "x is 12");
- browser.test.notifyPass("background test passed");
- });
-}
-
-function contentScript() {
- window.x = 12;
- browser.runtime.onMessage.addListener(function() {});
- browser.runtime.sendMessage(window.x);
-}
-
-let extensionData = {
- background,
- manifest: {
- "content_scripts": [{
- "matches": ["http://mochi.test/*/file_sample.html"],
- "js": ["content_script.js"],
- "run_at": "document_idle",
- }],
- },
-
- files: {
- "content_script.js": contentScript,
- },
-};
-
-add_task(function* test_contentscript() {
- let extension = ExtensionTestUtils.loadExtension(extensionData);
- yield extension.startup();
-
- let win = window.open("file_sample.html");
-
- yield Promise.all([waitForLoad(win), extension.awaitFinish()]);
-
- win.close();
-
- yield extension.unload();
- info("extension unloaded");
-});
-</script>
-
-</body>
-</html>