summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/mochitest
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-06-26 16:09:08 -0400
committerMatt A. Tobin <email@mattatobin.com>2018-06-26 16:09:08 -0400
commiteda567b364a06e9e63efb865a6b1c73f1cb5232e (patch)
tree912ab15d877f733318e2c0394713bca33b830547 /toolkit/mozapps/extensions/test/mochitest
parent80eb356d57fc310cdf812cae63de30d6e56c1788 (diff)
downloadUXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar.gz
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar.lz
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar.xz
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.zip
[AllAM] Remove Mozilla Tests
Diffstat (limited to 'toolkit/mozapps/extensions/test/mochitest')
-rw-r--r--toolkit/mozapps/extensions/test/mochitest/file_bug687194.xpibin1602 -> 0 bytes
-rw-r--r--toolkit/mozapps/extensions/test/mochitest/file_empty.html2
-rw-r--r--toolkit/mozapps/extensions/test/mochitest/mochitest.ini10
-rw-r--r--toolkit/mozapps/extensions/test/mochitest/test_bug609794.html27
-rw-r--r--toolkit/mozapps/extensions/test/mochitest/test_bug687194.html133
-rw-r--r--toolkit/mozapps/extensions/test/mochitest/test_bug887098.html51
6 files changed, 0 insertions, 223 deletions
diff --git a/toolkit/mozapps/extensions/test/mochitest/file_bug687194.xpi b/toolkit/mozapps/extensions/test/mochitest/file_bug687194.xpi
deleted file mode 100644
index dfc035053..000000000
--- a/toolkit/mozapps/extensions/test/mochitest/file_bug687194.xpi
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/mochitest/file_empty.html b/toolkit/mozapps/extensions/test/mochitest/file_empty.html
deleted file mode 100644
index b6c8a53b4..000000000
--- a/toolkit/mozapps/extensions/test/mochitest/file_empty.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!DOCTYPE html>
-<html><head></head><body><span id="text">Nothing to see here</span></body></html>
diff --git a/toolkit/mozapps/extensions/test/mochitest/mochitest.ini b/toolkit/mozapps/extensions/test/mochitest/mochitest.ini
deleted file mode 100644
index 375f619b4..000000000
--- a/toolkit/mozapps/extensions/test/mochitest/mochitest.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[DEFAULT]
-skip-if = buildapp == 'b2g'
-support-files =
- file_empty.html
- file_bug687194.xpi
-
-[test_bug609794.html]
-[test_bug687194.html]
-skip-if = e10s || os == "android" # this test creates its own child process, no need to run it in e10s
-[test_bug887098.html]
diff --git a/toolkit/mozapps/extensions/test/mochitest/test_bug609794.html b/toolkit/mozapps/extensions/test/mochitest/test_bug609794.html
deleted file mode 100644
index d13e6ef2f..000000000
--- a/toolkit/mozapps/extensions/test/mochitest/test_bug609794.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=609794
--->
-<head>
- <title>Test for Bug 609794</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=609794">Mozilla Bug 609794</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-/** Test for Bug 609794 **/
-var obj = Object.create(window);
-is(Object.prototype.toString.call(obj.InstallTrigger), "[object InstallTriggerImpl]", "can get InstallTrigger through the prototype");
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/mozapps/extensions/test/mochitest/test_bug687194.html b/toolkit/mozapps/extensions/test/mochitest/test_bug687194.html
deleted file mode 100644
index 8f99ea73a..000000000
--- a/toolkit/mozapps/extensions/test/mochitest/test_bug687194.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for registering/unregistering chrome OOP</title>
- <script type="application/javascript"
- src="/tests/SimpleTest/SimpleTest.js">
- </script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
- <script type="application/javascript;version=1.8">
- "use strict";
-
- SimpleTest.waitForExplicitFinish();
-
- const childFrameURL =
- "data:text/html,<!DOCTYPE HTML><html><body></body></html>";
-
- function childFrameScript() {
- "use strict";
-
- var ios =
- Components.classes["@mozilla.org/network/io-service;1"]
- .getService(Components.interfaces.nsIIOService);
- let cr =
- Components.classes["@mozilla.org/chrome/chrome-registry;1"]
- .getService(Ci.nsIXULChromeRegistry);
- addMessageListener("test687194:resolveChromeURI", function(message) {
- let result;
- let threw = false;
- try {
- let uri = ios.newURI(message.data.URI, null, null);
- result = cr.convertChromeURL(uri).spec;
- } catch (e) {
- threw = true;
- result = "EXCEPTION: " + e;
- }
-
- message.target.sendAsyncMessage("test687194:resolveChromeURI:Answer",
- { threw: threw, result: result });
- });
- }
-
- let test;
- function* testStructure(mm) {
- let lastResult;
-
- mm.addMessageListener("test687194:resolveChromeURI:Answer", function(msg) {
- test.next(msg.data);
- });
-
- mm.sendAsyncMessage("test687194:resolveChromeURI",
- { URI: "chrome://bug687194/content/e10sbug.js" });
- lastResult = yield;
- is(lastResult.threw, true, "URI shouldn't resolve to begin with");
-
- let { AddonManager } = SpecialPowers.Cu.import("resource://gre/modules/AddonManager.jsm", {});
- const INSTALL_URI =
- "http://mochi.test:8888/tests/toolkit/mozapps/extensions/test/mochitest/file_bug687194.xpi"
- AddonManager.getInstallForURL(INSTALL_URI, (install) => {
- install = SpecialPowers.wrap(install);
- install.addListener(SpecialPowers.wrapCallbackObject({
- onInstallEnded: function(install, addon) {
- SimpleTest.executeSoon(() => test.next(addon));
- }
- }));
- install.install();
- }, "application/x-xpinstall");
-
- let addon = SpecialPowers.wrap(yield);
-
- mm.sendAsyncMessage("test687194:resolveChromeURI",
- { URI: "chrome://bug687194/content/e10sbug.js" });
- lastResult = yield;
- is(lastResult.threw, false, "able to resolve after the installation");
-
- let listener = SpecialPowers.wrapCallbackObject({
- onUninstalled: function(removedAddon) {
- if (removedAddon.id === addon.id) {
- AddonManager.removeAddonListener(listener);
- SimpleTest.executeSoon(() => test.next());
- }
- }
- });
- AddonManager.addAddonListener(listener);
- addon.uninstall();
-
- yield;
-
- mm.sendAsyncMessage("test687194:resolveChromeURI",
- { URI: "chrome://bug687194/content/e10sbug.js" });
- lastResult = yield;
- is(lastResult.threw, true, "should have unregistered the URI");
- SimpleTest.finish();
- }
-
- function runTests() {
- info("Browser prefs set.");
-
- let iframe = document.createElement("iframe");
- SpecialPowers.wrap(iframe).mozbrowser = true;
- iframe.id = "iframe";
- iframe.src = childFrameURL;
-
- iframe.addEventListener("mozbrowserloadend", function() {
- info("Got iframe load event.");
- let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
- mm.loadFrameScript("data:,(" + childFrameScript.toString() + ")();",
- false);
-
- test = testStructure(mm);
- test.next();
- });
-
- document.body.appendChild(iframe);
- }
-
- addEventListener("load", function() {
- info("Got load event.");
-
- SpecialPowers.addPermission("browser", true, document);
- SpecialPowers.pushPrefEnv({
- "set": [
- ["dom.ipc.browser_frames.oop_by_default", true],
- ["dom.mozBrowserFramesEnabled", true],
- ["browser.pagethumbnails.capturing_disabled", true]
- ]
- }, runTests);
- });
- </script>
-</body>
-</html>
diff --git a/toolkit/mozapps/extensions/test/mochitest/test_bug887098.html b/toolkit/mozapps/extensions/test/mochitest/test_bug887098.html
deleted file mode 100644
index 2b2033a37..000000000
--- a/toolkit/mozapps/extensions/test/mochitest/test_bug887098.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=887098
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Bug 887098</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript">
-
- /** Test for Bug 887098 **/
- SimpleTest.waitForExplicitFinish();
-
- function loaded() {
- var iwin = $('ifr').contentWindow;
- var href = SpecialPowers.wrap(iwin).location.href;
- if (/file_empty/.test(href)) {
- window.evalRef = iwin.eval;
- window.installTriggerRef = iwin.InstallTrigger; // Force lazy instantiation.
- // about: is privileged, so we need to be privileged to load it.
- SpecialPowers.wrap(iwin).location.href = 'about:';
- } else {
- is(href, 'about:', "Successfully navigated to about:");
- try {
- evalRef('InstallTrigger.install({URL: "chrome://global/skin/global.css"});');
- ok(false, "Should have thrown when trying to install restricted URI from InstallTrigger");
- } catch (e) {
- //XXXgijs this test broke because of the switch to webidl. I'm told
- // it has to do with compartments and the fact that we eval in "about:".
- // Tracking in bug 1007671
- todo(/permission/.test(e), "We should throw a security exception. Got: " + e);
- }
- SimpleTest.finish();
- }
- }
-
- </script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=887098">Mozilla Bug 887098</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<iframe onload="loaded();" id="ifr" src="file_empty.html"></iframe>
-<pre id="test">
-</pre>
-</body>
-</html>