Bug 1335475 - Remove test about loading Java from file: origins because it's no longer relevant several times over. r=qdot
☠☠ backed out by ed96183557d8 ☠ ☠
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 08 Mar 2017 14:55:44 -0500
changeset 346999 9900d421e24e
parent 346998 19c91edc6549
child 347000 ab966fb76f78
push id38688
push userbsmedberg@mozilla.com
push dateFri, 10 Mar 2017 21:23:32 +0000
treeherderautoland@ab966fb76f78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1335475
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1335475 - Remove test about loading Java from file: origins because it's no longer relevant several times over. r=qdot MozReview-Commit-ID: BciLFXUvuUR
dom/plugins/test/mochitest/mochitest.ini
dom/plugins/test/mochitest/test_bug406541.html
--- a/dom/plugins/test/mochitest/mochitest.ini
+++ b/dom/plugins/test/mochitest/mochitest.ini
@@ -39,17 +39,16 @@ skip-if = !crashreporter
 [test_bug1028200-4.html]
 skip-if = !crashreporter
 [test_bug1028200-5.html]
 skip-if = !crashreporter
 [test_bug1028200-6.html]
 skip-if = !crashreporter
 [test_bug1028200-7.html]
 skip-if = !crashreporter
-[test_bug406541.html]
 [test_bug532208.html]
 [test_bug539565-1.html]
 [test_bug539565-2.html]
 [test_bug738396.html]
 [test_bug771202.html]
 [test_bug777098.html]
 [test_bug784131.html]
 [test_bug813906.html]
deleted file mode 100644
--- a/dom/plugins/test/mochitest/test_bug406541.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<!doctype html>
-<html>
-<head>
-  <title>Test for Bug 406541</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="plugin-utils.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-
-  <meta http-equiv="content-type" content="text/html; charset=utf-8">
-</head>
-<body>
-<script type="application/x-child-payload" id="child-payload">
-  // This is injected into the file:/// origin iframe, see below.
-
-  // appletA should spawn, appletB, with a codebase outside the temp directory,
-  // should not.
-  var appletA = document.createElement("applet");
-  var appletB = document.createElement("applet");
-  var appletC = document.createElement("applet");
-  appletA.type = appletB.type = appletC.type = "application/x-java-test";
-  appletB.setAttribute("codebase", "file:///");
-  appletC.setAttribute("codebase", "./subdir_bug406541/");
-  document.body.appendChild(appletA);
-  document.body.appendChild(appletB);
-  document.body.appendChild(appletC);
-  function isSpawned(plugin) {
-    try {
-      var x = plugin.getJavaCodebase();
-      return true;
-    } catch (e) {}
-    return false;
-  }
-  window.parent.postMessage({ "A": isSpawned(appletA),
-                              "B": isSpawned(appletB),
-                              "C": isSpawned(appletC) }, "*");
-</script>
-<script type="application/javascript">
-  SimpleTest.waitForExplicitFinish();
-  setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED,
-                            "Java Test Plug-in");
-  SpecialPowers.pushPrefEnv({ "set": [
-                              ['plugin.java.mime', 'application/x-java-test']
-                            ] }, runTest);
-
-  function runTest() {
-    // Create a empty file and point an iframe at it
-    var Cc = SpecialPowers.Cc;
-    var Ci = SpecialPowers.Ci;
-    var file = Cc["@mozilla.org/file/directory_service;1"]
-      .getService(Ci.nsIProperties)
-      .get("TmpD", Ci.nsIFile);
-    var subdir = Cc["@mozilla.org/file/directory_service;1"]
-      .getService(Ci.nsIProperties)
-      .get("TmpD", Ci.nsIFile);
-    file.append("test_bug406541.html");
-    file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
-    subdir.append("subdir_bug406541");
-    subdir.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0600);
-
-    var i = document.createElement("iframe");
-    var loaded = false;
-    i.addEventListener("load", function initialLoad() {
-      if (!loaded) {
-        // Once loaded, use special powers to point it at the file
-        SpecialPowers.wrap(i.contentWindow).location.href = "file://" + file.path;
-        loaded = true;
-      } else {
-        // Inject the child-payload script to the file:/// origin. Let it test
-        // applet spawning and send the results in a postMessage. (Because I
-        // couldn't get SpecialPowers to let me touch applets cross-origin, then
-        // gave up.)
-        var innerdoc = SpecialPowers.wrap(i.contentWindow).document;
-        var s = innerdoc.createElement("script");
-        s.type = "text/javascript";
-        s.textContent = document.getElementById("child-payload").textContent;
-        var finished = false;
-        window.onmessage = function(message) {
-          ok(message.data.A, "Plugin A should spawn");
-          ok(!message.data.B, "Plugin B should NOT spawn");
-          ok(message.data.C, "Plugin C should spawn");
-          file.remove(false);
-          subdir.remove(false);
-          finished = true;
-          SimpleTest.finish();
-        };
-        innerdoc.body.appendChild(s);
-
-        SimpleTest.executeSoon(function() {
-          if (!finished) {
-            ok(finished, "Should have received callback by now");
-            SimpleTest.finish();
-          }
-        });
-      }
-    });
-    document.body.appendChild(i);
-  }
-</script>
-</body>
-</html>