Bug 1257621: Disable ipc tests for webrtc (test_ipc pseudo-e10s test) r=drno
authorRandell Jesup <rjesup@jesup.org>
Thu, 17 Mar 2016 20:45:29 -0400
changeset 342008 cb071b852d68d5ef8b152658017e9bdf5f00a18e
parent 342007 cb378ac9d4d85899f7eafbc58dcc8abd83c2e71d
child 342009 affd6e75efcc015df869459f05cec8bb3e739b32
push id13342
push userbmo:james@hoppipolla.co.uk
push dateFri, 18 Mar 2016 09:55:58 +0000
reviewersdrno
bugs1257621
milestone48.0a1
Bug 1257621: Disable ipc tests for webrtc (test_ipc pseudo-e10s test) r=drno MozReview-Commit-ID: 3NGI0NTu0mu
dom/media/moz.build
dom/media/tests/mochitest/ipc/ipc.json
dom/media/tests/mochitest/ipc/mochitest.ini
dom/media/tests/mochitest/ipc/test_ipc.html
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -63,17 +63,16 @@ if CONFIG['MOZ_EME']:
 TEST_DIRS += [
     'compiledtest',
     'gtest',
 ]
 
 MOCHITEST_MANIFESTS += [
     'test/mochitest.ini',
     'tests/mochitest/identity/mochitest.ini',
-    'tests/mochitest/ipc/mochitest.ini',
 ]
 
 if CONFIG['MOZ_WEBRTC']:
     MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini']
     WEBRTC_SIGNALLING_TEST_MANIFESTS += ['tests/mochitest/steeplechase.ini']
     WEBRTC_SIGNALLING_TEST_MANIFESTS += ['tests/mochitest/steeplechase_long/steeplechase_long.ini']
 
 XPIDL_SOURCES += [
deleted file mode 100644
--- a/dom/media/tests/mochitest/ipc/ipc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-"runtests":{
-    "dom/media/tests/mochitest/test_getUserMedia_basicVideoAudio.html":"included",
-    "dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html":"included",
-    "dom/media/tests/mochitest/test_dataChannel_basicAudioVideo.html":"included"
-},
-"excludetests":{
-   }
-}
deleted file mode 100644
--- a/dom/media/tests/mochitest/ipc/mochitest.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[DEFAULT]
-tags=msg
-subsuite=media
-support-files =
-  ipc.json
-
-skip-if = e10s
-
-[test_ipc.html]
-skip-if =  buildapp == 'b2g' || buildapp == 'mulet' || toolkit == 'android' #bug 910661 # b2g(nested ipc not working) b2g-debug(debug-only failure) b2g-desktop(nested ipc not working)
deleted file mode 100644
--- a/dom/media/tests/mochitest/ipc/test_ipc.html
+++ /dev/null
@@ -1,176 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for OOP PeerConncection</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.7">
-    "use strict";
-
-    SimpleTest.waitForExplicitFinish();
-
-    // This isn't a single test. It runs the entirety of the PeerConnection
-    // tests. Each of those has a normal timeout handler, so there's no point in
-    // having a timeout here. I'm setting this really high just to avoid getting
-    // killed.
-    SimpleTest.requestLongerTimeout(100);
-
-    // The crash observer registration functions are stubbed out here to
-    // prevent the iframe test runner from breaking later crash-related tests.
-    function iframeScriptFirst() {
-      SpecialPowers.prototype.registerProcessCrashObservers = () => {};
-      SpecialPowers.prototype.unregisterProcessCrashObservers = () => {};
-
-      content.wrappedJSObject.RunSet.reloadAndRunAll({
-        preventDefault: function() { },
-        __exposedProps__: { preventDefault: 'r' }
-      });
-    }
-
-    function iframeScriptSecond() {
-      let TestRunner = content.wrappedJSObject.TestRunner;
-      let oldComplete = TestRunner.onComplete;
-
-      TestRunner.onComplete = function() {
-        TestRunner.onComplete = oldComplete;
-
-        sendAsyncMessage("test:PeerConnection:ipcTestComplete", {
-          result: JSON.stringify(TestRunner._failedTests)
-        });
-
-        if (oldComplete) {
-          oldComplete();
-        }
-      };
-
-      TestRunner.structuredLogger._dumpMessage = function(msg) {
-        sendAsyncMessage("test:PeerConnection:ipcTestMessage", { msg: msg });
-      }
-    }
-
-    let VALID_ACTIONS = ['suite_start', 'suite_end', 'test_start', 'test_end', 'test_status', 'process_output', 'log'];
-    function validStructuredMessage(message) {
-      return message.action !== undefined && VALID_ACTIONS.indexOf(message.action) >= 0;
-    }
-    function onTestMessage(data) {
-      let message = SpecialPowers.wrap(data).data.msg;
-
-      if (validStructuredMessage(message)) {
-        switch (message.action) {
-          case "test_status":
-          case "test_end":
-            let test_tokens = message.test.split("/");
-            let test_name = test_tokens[test_tokens.length - 1];
-            if (message.subtest) {
-                test_name += " | " + message.subtest;
-            }
-            ok(message.expected === undefined, test_name, message.message);
-            break;
-          case "log":
-            info(message.message);
-            break;
-          default:
-            // nothing
-        }
-      }
-    }
-
-    function onTestComplete() {
-      let comp = SpecialPowers.wrap(SpecialPowers.Components);
-      let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
-      let spObserver = comp.classes["@mozilla.org/special-powers-observer;1"]
-                            .getService(comp.interfaces.nsIMessageListener);
-
-      mm.removeMessageListener("SPPrefService", spObserver);
-      mm.removeMessageListener("SPProcessCrashService", spObserver);
-      mm.removeMessageListener("SPPingService", spObserver);
-      mm.removeMessageListener("SpecialPowers.Quit", spObserver);
-      mm.removeMessageListener("SPPermissionManager", spObserver);
-
-      mm.removeMessageListener("test:PeerConnection:ipcTestMessage", onTestMessage);
-      mm.removeMessageListener("test:PeerConnection:ipcTestComplete", onTestComplete);
-
-      SimpleTest.executeSoon(function () { SimpleTest.finish(); });
-    }
-
-    function runTests() {
-      let iframe = document.createElement("iframe");
-      SpecialPowers.wrap(iframe).mozbrowser = true;
-      iframe.id = "iframe";
-      iframe.style.width = "100%";
-      iframe.style.height = "1000px";
-
-      function iframeLoadSecond() {
-        ok(true, "Got second iframe load event.");
-        iframe.removeEventListener("mozbrowserloadend", iframeLoadSecond);
-        let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
-        mm.loadFrameScript("data:,(" + iframeScriptSecond.toString() + ")();",
-                           false);
-      }
-
-      function iframeLoadFirst() {
-        ok(true, "Got first iframe load event.");
-        iframe.removeEventListener("mozbrowserloadend", iframeLoadFirst);
-        iframe.addEventListener("mozbrowserloadend", iframeLoadSecond);
-
-        let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
-
-        let comp = SpecialPowers.wrap(SpecialPowers.Components);
-
-        let spObserver =
-          comp.classes["@mozilla.org/special-powers-observer;1"]
-              .getService(comp.interfaces.nsIMessageListener);
-
-        mm.addMessageListener("SPPrefService", spObserver);
-        mm.addMessageListener("SPProcessCrashService", spObserver);
-        mm.addMessageListener("SPPingService", spObserver);
-        mm.addMessageListener("SpecialPowers.Quit", spObserver);
-        mm.addMessageListener("SPPermissionManager", spObserver);
-
-        mm.addMessageListener("test:PeerConnection:ipcTestMessage", onTestMessage);
-        mm.addMessageListener("test:PeerConnection:ipcTestComplete", onTestComplete);
-
-        let specialPowersBase = "chrome://specialpowers/content/";
-        mm.loadFrameScript(specialPowersBase + "MozillaLogger.js", false);
-        mm.loadFrameScript(specialPowersBase + "specialpowersAPI.js", false);
-        mm.loadFrameScript(specialPowersBase + "specialpowers.js", false);
-
-        mm.loadFrameScript("data:,(" + iframeScriptFirst.toString() + ")();", false);
-      }
-
-      iframe.addEventListener("mozbrowserloadend", iframeLoadFirst);
-
-      // Strip the filename and a directory level.
-      let href =  window.location.href;
-      href = href.substring(0, href.lastIndexOf('/'));
-      href = href.substring(0, href.lastIndexOf('/'));
-
-      href += "?consoleLevel=INFO" +
-              "&testManifest=tests/dom/media/tests/mochitest/ipc/ipc.json";
-      iframe.src = href;
-      document.body.appendChild(iframe);
-    }
-
-    addEventListener("load", function() {
-
-      SpecialPowers.addPermission("browser", true, document);
-      SpecialPowers.pushPrefEnv({
-        "set": [
-          ["media.peerconnection.ipc.enabled", true],
-
-          // TODO: remove this as part of bug 820712
-          ["network.disable.ipc.security", true],
-
-          ["dom.ipc.browser_frames.oop_by_default", true],
-          ["dom.mozBrowserFramesEnabled", true],
-          ["browser.pagethumbnails.capturing_disabled", true]
-        ]
-      }, runTests);
-    });
-
-  </script>
-</body>
-</html>