Bug 1561964 - Re-enable all tests in dom/security/test on Android. r=ckerschb
☠☠ backed out by 17167e60ae2a ☠ ☠
authorAgi Sferro <agi@sferro.dev>
Thu, 29 Aug 2019 16:04:14 +0000
changeset 554428 92848bd0c1e006b7e61113d3206bc6656151e183
parent 554427 89963083c79dd5f7fbb1bcf90efe5f9985597db5
child 554429 f61dd73cac3a8fde46b76f20c7da192471a0b26e
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb
bugs1561964
milestone70.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 1561964 - Re-enable all tests in dom/security/test on Android. r=ckerschb Differential Revision: https://phabricator.services.mozilla.com/D37488
dom/security/test/csp/file_upgrade_insecure.html
dom/security/test/csp/file_upgrade_insecure_meta.html
dom/security/test/csp/mochitest.ini
dom/security/test/csp/test_upgrade_insecure.html
dom/security/test/general/mochitest.ini
dom/security/test/general/test_assert_about_page_no_csp.html
dom/security/test/mixedcontentblocker/file_main_bug803225.html
dom/security/test/mixedcontentblocker/mochitest.ini
dom/security/test/mixedcontentblocker/test_bug803225.html
--- a/dom/security/test/csp/file_upgrade_insecure.html
+++ b/dom/security/test/csp/file_upgrade_insecure.html
@@ -44,34 +44,38 @@
   <script type="application/javascript">
     var myXHR = new XMLHttpRequest();
     myXHR.open("GET", "http://example.com/tests/dom/security/test/csp/file_upgrade_insecure_server.sjs?xhr");
     myXHR.send(null);
   </script>
 
   <!-- websockets: upgrade ws:// to wss://-->
   <script type="application/javascript">
-    var mySocket = new WebSocket("ws://example.com/tests/dom/security/test/csp/file_upgrade_insecure");
-    mySocket.onopen = function(e) {
-      if (mySocket.url.includes("wss://")) {
-        window.parent.postMessage({result: "websocket-ok"}, "*");
-      }
-      else {
-        window.parent.postMessage({result: "websocket-error"}, "*");
-      }
-      mySocket.close();
-    };
-    mySocket.onerror = function(e) {
-      // debug information for Bug 1316305
-      dump("  xxx mySocket.onerror: (mySocket): " + mySocket + "\n");
-      dump("  xxx mySocket.onerror: (mySocket.url): " + mySocket.url + "\n");
-      dump("  xxx mySocket.onerror: (e): " + e + "\n");
-      dump("  xxx mySocket.onerror: (e.message): " + e.message + "\n");
-      window.parent.postMessage({result: "websocket-unexpected-error"}, "*");
-    };
+    // WebSocket tests are not supported on Android yet. Bug 1566168
+    const {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
+    if (AppConstants.platform !== "android") {
+      var mySocket = new WebSocket("ws://example.com/tests/dom/security/test/csp/file_upgrade_insecure");
+      mySocket.onopen = function(e) {
+        if (mySocket.url.includes("wss://")) {
+          window.parent.postMessage({result: "websocket-ok"}, "*");
+        }
+        else {
+          window.parent.postMessage({result: "websocket-error"}, "*");
+        }
+        mySocket.close();
+      };
+      mySocket.onerror = function(e) {
+        // debug information for Bug 1316305
+        dump("  xxx mySocket.onerror: (mySocket): " + mySocket + "\n");
+        dump("  xxx mySocket.onerror: (mySocket.url): " + mySocket.url + "\n");
+        dump("  xxx mySocket.onerror: (e): " + e + "\n");
+        dump("  xxx mySocket.onerror: (e.message): " + e.message + "\n");
+        window.parent.postMessage({result: "websocket-unexpected-error"}, "*");
+      };
+    }
   </script>
 
   <!-- form action: (upgrade POST from http:// to https://) -->
   <iframe name='formFrame' id='formFrame'></iframe>
   <form target="formFrame" action="http://example.com/tests/dom/security/test/csp/file_upgrade_insecure_server.sjs?form" method="POST">
     <input name="foo" value="foo">
     <input type="submit" id="submitButton" formenctype='multipart/form-data' value="Submit form">
   </form>
--- a/dom/security/test/csp/file_upgrade_insecure_meta.html
+++ b/dom/security/test/csp/file_upgrade_insecure_meta.html
@@ -45,29 +45,33 @@
   <script type="application/javascript">
     var myXHR = new XMLHttpRequest();
     myXHR.open("GET", "http://example.com/tests/dom/security/test/csp/file_upgrade_insecure_server.sjs?xhr");
     myXHR.send(null);
   </script>
 
   <!-- websockets: upgrade ws:// to wss://-->
   <script type="application/javascript">
-    var mySocket = new WebSocket("ws://example.com/tests/dom/security/test/csp/file_upgrade_insecure");
-    mySocket.onopen = function(e) {
-      if (mySocket.url.includes("wss://")) {
-        window.parent.postMessage({result: "websocket-ok"}, "*");
-      }
-      else {
-        window.parent.postMessage({result: "websocket-error"}, "*");
-      }
-      mySocket.close();
-    };
-    mySocket.onerror = function(e) {
-      window.parent.postMessage({result: "websocket-unexpected-error"}, "*");
-    };
+    // WebSocket tests are not supported on Android Yet. Bug 1566168.
+    const {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
+    if (AppConstants.platform !== "android") {
+      var mySocket = new WebSocket("ws://example.com/tests/dom/security/test/csp/file_upgrade_insecure");
+      mySocket.onopen = function(e) {
+        if (mySocket.url.includes("wss://")) {
+          window.parent.postMessage({result: "websocket-ok"}, "*");
+        }
+        else {
+          window.parent.postMessage({result: "websocket-error"}, "*");
+        }
+        mySocket.close();
+      };
+      mySocket.onerror = function(e) {
+        window.parent.postMessage({result: "websocket-unexpected-error"}, "*");
+      };
+    }
   </script>
 
   <!-- form action: (upgrade POST from http:// to https://) -->
   <iframe name='formFrame' id='formFrame'></iframe>
   <form target="formFrame" action="http://example.com/tests/dom/security/test/csp/file_upgrade_insecure_server.sjs?form" method="POST">
     <input name="foo" value="foo">
     <input type="submit" id="submitButton" formenctype='multipart/form-data' value="Submit form">
   </form>
--- a/dom/security/test/csp/mochitest.ini
+++ b/dom/security/test/csp/mochitest.ini
@@ -247,17 +247,17 @@ prefs =
 [test_bug885433.html]
 [test_bug888172.html]
 [test_evalscript.html]
 [test_evalscript_blocked_by_strict_dynamic.html]
 [test_evalscript_allowed_by_strict_dynamic.html]
 [test_frameancestors.html]
 skip-if = fission
 [test_frameancestors_userpass.html]
-skip-if = fission || toolkit == 'android' # Times out, not sure why (bug 1008445)
+skip-if = fission
 [test_inlinescript.html]
 [test_inlinestyle.html]
 [test_invalid_source_expression.html]
 [test_bug836922_npolicies.html]
 skip-if = verify
 [test_bug886164.html]
 [test_redirects.html]
 [test_bug910139.html]
@@ -286,21 +286,19 @@ skip-if = verify
 [test_subframe_run_js_if_allowed.html]
 [test_leading_wildcard.html]
 [test_multi_policy_injection_bypass.html]
 [test_null_baseuri.html]
 [test_dual_header.html]
 [test_win_open_blocked.html]
 [test_upgrade_insecure.html]
 # no ssl support as well as websocket tests do not work (see test_websocket.html)
-skip-if = fission || (toolkit == 'android') || (os != 'linux' && !debug) # Bug 1183300
+skip-if = fission || (os != 'linux' && !debug) # Bug 1183300
 [test_upgrade_insecure_reporting.html]
-skip-if = toolkit == 'android'
 [test_upgrade_insecure_cors.html]
-skip-if = toolkit == 'android'
 [test_upgrade_insecure_loopback.html]
 [test_report_for_import.html]
 [test_blocked_uri_in_reports.html]
 [test_service_worker.html]
 [test_child-src_worker.html]
 [test_child-src_worker_data.html]
 [test_child-src_worker-redirect.html]
 [test_child-src_iframe.html]
@@ -328,17 +326,17 @@ tags = mcb
 [test_strict_dynamic_default_src.html]
 [test_upgrade_insecure_navigation.html]
 skip-if = fission
 [test_punycode_host_src.html]
 [test_iframe_sandbox_srcdoc.html]
 [test_iframe_srcdoc.html]
 [test_image_nonce.html]
 [test_websocket_self.html]
-skip-if = toolkit == 'android'
+skip-if = toolkit == 'android' # no websocket support Bug 982828
 [test_ignore_xfo.html]
 [test_data_csp_inheritance.html]
 [test_data_csp_merge.html]
 [test_report_font_cache.html]
 [test_data_doc_ignore_meta_csp.html]
 [test_meta_csp_self.html]
 [test_uir_top_nav.html]
 skip-if = fission # Crashes: @ mozilla::dom::ContentParent::CommonCreateWindow(mozilla::dom::PBrowserParent*, bool, unsigned int const&, bool const&, bool const&, bool const&, nsIURI*, nsTString<char> const&, float const&, unsigned long, nsTString<char16_t> const&, nsresult&, nsCOMPtr<nsIRemoteTab>&, bool*, int&, nsIPrincipal*, nsIReferrerInfo*, bool, nsIContentSecurityPolicy*)
@@ -382,17 +380,17 @@ support-files =
   file_windowwatcher_subframeD.html
   file_windowwatcher_win_open.html
 skip-if = fission # Crashes: @ mozilla::dom::ContentParent::CommonCreateWindow(mozilla::dom::PBrowserParent*, bool, unsigned int const&, bool const&, bool const&, bool const&, nsIURI*, nsTString<char> const&, float const&, unsigned long, nsTString<char16_t> const&, nsresult&, nsCOMPtr<nsIRemoteTab>&, bool*, int&, nsIPrincipal*, nsIReferrerInfo*, bool, nsIContentSecurityPolicy*)
 [test_script_template.html]
 support-files =
   file_script_template.html
   file_script_template.js
 [test_reloadInFreshProcess.html]
-# no ssl support on android and no large-allocation on win32
+# no large-allocation on win32, no e10s-multi support on Android Bug 1530770
 skip-if =
   (toolkit == 'android') || (os == 'win' && bits == 32) ||
   fission # Crashes: @ mozilla::dom::ContentParent::CommonCreateWindow(mozilla::dom::PBrowserParent*, bool, unsigned int const&, bool const&, bool const&, bool const&, nsIURI*, nsTString<char> const&, float const&, unsigned long, nsTString<char16_t> const&, nsresult&, nsCOMPtr<nsIRemoteTab>&, bool*, int&, nsIPrincipal*, nsIReferrerInfo*, bool, nsIContentSecurityPolicy*)
 support-files =
   file_reloadInFreshProcess.sjs
 [test_parent_location_js.html]
 support-files =
   file_parent_location_js.html
--- a/dom/security/test/csp/test_upgrade_insecure.html
+++ b/dom/security/test/csp/test_upgrade_insecure.html
@@ -23,16 +23,18 @@
  * We perform an XHR request to the *.sjs file which is processed async on
  * the server and waits till all the requests were processed by the server.
  * Once the server received all the different requests, the server responds
  * to the initial XHR request with an array of results which must match
  * the expected results from each test, making sure that all requests
  * received by the server (*.sjs) were actually *https* requests.
  */
 
+const {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
+
 const UPGRADE_POLICY =
   "upgrade-insecure-requests;" +               // upgrade all http requests to https
   "block-all-mixed-content;" +                 // upgrade should be enforced before block-all.
   "default-src https: wss: 'unsafe-inline';" + // only allow https: and wss:
   "form-action https:;";                       // explicit, no fallback to default-src
 
 const UPGRADE_POLICY_NO_DEFAULT_SRC =
   "upgrade-insecure-requests;" +               // upgrade all http requests to https
@@ -45,65 +47,72 @@ const NO_UPGRADE_POLICY =
 var tests = [
   { // (1) test that all requests within an >> https << page get updated
     policy: UPGRADE_POLICY,
     topLevelScheme: "https://",
     description: "upgrade all requests on toplevel https",
     deliveryMethod: "header",
     results: [
       "iframe-ok", "script-ok", "img-ok", "img-redir-ok", "font-ok", "xhr-ok", "style-ok",
-      "media-ok", "object-ok", "form-ok", "websocket-ok", "nested-img-ok"
+      "media-ok", "object-ok", "form-ok", "nested-img-ok"
     ]
   },
   { // (2) test that all requests within an >> http << page get updated
     policy: UPGRADE_POLICY,
     topLevelScheme: "http://",
     description: "upgrade all requests on toplevel http",
     deliveryMethod: "header",
     results: [
       "iframe-ok", "script-ok", "img-ok", "img-redir-ok", "font-ok", "xhr-ok", "style-ok",
-      "media-ok", "object-ok", "form-ok", "websocket-ok", "nested-img-ok"
+      "media-ok", "object-ok", "form-ok", "nested-img-ok"
     ]
   },
   { // (3) test that all requests within an >> http << page get updated, but do
     //     not specify a default-src directive.
     policy: UPGRADE_POLICY_NO_DEFAULT_SRC,
     topLevelScheme: "http://",
     description: "upgrade all requests on toplevel http where default-src is not specified",
     deliveryMethod: "header",
     results: [
       "iframe-ok", "script-ok", "img-ok", "img-redir-ok", "font-ok", "xhr-ok", "style-ok",
-      "media-ok", "object-ok", "form-ok", "websocket-ok", "nested-img-ok"
+      "media-ok", "object-ok", "form-ok", "nested-img-ok"
     ]
   },
   { // (4) test that no requests get updated if >> upgrade-insecure-requests << is not used
     policy: NO_UPGRADE_POLICY,
     topLevelScheme: "http://",
     description: "do not upgrade any requests on toplevel http",
     deliveryMethod: "header",
     results: [
       "iframe-error", "script-error", "img-error", "img-redir-error", "font-error",
       "xhr-error", "style-error", "media-error", "object-error", "form-error",
-      "websocket-error", "nested-img-error"
+      "nested-img-error"
     ]
   },
   { // (5) test that all requests within an >> https << page using meta CSP get updated
     // policy: UPGRADE_POLICY, that test uses UPGRADE_POLICY within
     //                         file_upgrade_insecure_meta.html
     //                         no need to define it within that object.
     topLevelScheme: "https://",
     description: "upgrade all requests on toplevel https using meta csp",
     deliveryMethod: "meta",
     results: [
       "iframe-ok", "script-ok", "img-ok", "img-redir-ok", "font-ok", "xhr-ok", "style-ok",
-      "media-ok", "object-ok", "form-ok", "websocket-ok", "nested-img-ok"
+      "media-ok", "object-ok", "form-ok", "nested-img-ok"
     ]
   },
 ];
 
+// TODO: WebSocket tests are not supported on Android Yet. Bug 1566168.
+if (AppConstants.platform !== "android") {
+    for (let test of tests) {
+        test.results.push(test.results[0] == "iframe-ok" ? "websocket-ok" : "websocket-error");
+    }
+}
+
 var counter = 0;
 var curTest;
 
 function loadTestPage() {
   curTest = tests[counter++];
   var src = curTest.topLevelScheme + "example.com/tests/dom/security/test/csp/file_testserver.sjs?file=";
   if (curTest.deliveryMethod === "header") {
     // append the file that should be served
--- a/dom/security/test/general/mochitest.ini
+++ b/dom/security/test/general/mochitest.ini
@@ -30,34 +30,31 @@ support-files =
 
 [test_contentpolicytype_targeted_link_iframe.html]
 [test_nosniff.html]
 [test_cache_split.html]
 skip-if = fission || verify
 [test_nosniff_navigation.html]
 [test_block_script_wrong_mime.html]
 [test_block_toplevel_data_navigation.html]
-skip-if = toolkit == 'android' # intermittent failure
 [test_block_toplevel_data_img_navigation.html]
-skip-if = toolkit == 'android' # intermittent failure
 [test_allow_opening_data_pdf.html]
-skip-if = toolkit == 'android'
+skip-if = toolkit == 'android' # no pdf reader on Android
 [test_allow_opening_data_json.html]
-skip-if = toolkit == 'android'
 [test_block_subresource_redir_to_data.html]
 [test_same_site_cookies_subrequest.html]
 [test_same_site_cookies_toplevel_nav.html]
 skip-if = fission # Crashes: @ mozilla::dom::ContentParent::CommonCreateWindow(mozilla::dom::PBrowserParent*, bool, unsigned int const&, bool const&, bool const&, bool const&, nsIURI*, nsTString<char> const&, float const&, unsigned long, nsTString<char16_t> const&, nsresult&, nsCOMPtr<nsIRemoteTab>&, bool*, int&, nsIPrincipal*, nsIReferrerInfo*, bool, nsIContentSecurityPolicy*)
 [test_same_site_cookies_cross_origin_context.html]
 fail-if = fission
 [test_same_site_cookies_from_script.html]
 [test_same_site_cookies_redirect.html]
 [test_same_site_cookies_toplevel_set_cookie.html]
 skip-if = fission
 [test_same_site_cookies_iframe.html]
 skip-if = fission # Fails intermittently under Fission
 [test_same_site_cookies_about.html]
 skip-if = fission # Fails intermittently under Fission
 [test_assert_about_page_no_csp.html]
-skip-if = !debug || toolkit == 'android'
+skip-if = !debug
 [test_same_site_cookies_laxByDefault.html]
 skip-if = fission
 support-files = closeWindow.sjs
--- a/dom/security/test/general/test_assert_about_page_no_csp.html
+++ b/dom/security/test/general/test_assert_about_page_no_csp.html
@@ -7,34 +7,42 @@
 </head>
 <body>
 <iframe id="testframe"></iframe>
 <script class="testbody" type="text/javascript">
 
   SimpleTest.waitForExplicitFinish();
   SimpleTest.expectAssertions(0, 1);
 
+  const {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
+
   // Test Setup:
   // The test overrules the whitelist of about: pages that are allowed to load without a CSP
   // and makes sure to hit the assertion within AssertAboutPageHasCSP().
   // However, due to the caching mechanism within AssertAboutPageHasCSP this
   // test loads a second dummy data: URI to reset the old cache and finally resets the pref
   // used for testing purposes.
 
-  let origWhiteList = SpecialPowers.getCharPref("csp.about_uris_without_csp");
+  let origWhiteList = "";
+  // Android doesn't have this pref
+  if (AppConstants.platform !== "android") {
+    origWhiteList = SpecialPowers.getCharPref("csp.about_uris_without_csp");
+  }
 
   SpecialPowers.setCharPref("csp.about_uris_without_csp", "");
   SpecialPowers.setBoolPref("csp.overrule_about_uris_without_csp_whitelist", true);
 
   ok(true, "sanity: prefs flipped and test runs");
   let myFrame = document.getElementById("testframe");
   myFrame.src = "about:blank";
   // booom :-)
 
-  SpecialPowers.setCharPref("csp.about_uris_without_csp", origWhiteList);
+  if (origWhiteList !== "") {
+      SpecialPowers.setCharPref("csp.about_uris_without_csp", origWhiteList);
+  }
   myFrame.src = "data:text/html,<body>just a dumy data: URI</body>";
 
   SpecialPowers.setBoolPref("csp.overrule_about_uris_without_csp_whitelist", false);
 
   SimpleTest.finish();
 </script>
 </pre>
 </body>
--- a/dom/security/test/mixedcontentblocker/file_main_bug803225.html
+++ b/dom/security/test/mixedcontentblocker/file_main_bug803225.html
@@ -17,16 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg
      "data",
      "javascript",
      "mailto",
      "resource",
      "wss"
 -->
 
 <script>
+  const {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
 
   //For tests that require setTimeout, set the timeout interval
   var TIMEOUT_INTERVAL = 100;
 
   var testContent = document.getElementById("testContent");
 
   // Test 1 & 2: about and javascript protcols within an iframe
   var data = Array(2,2);
@@ -143,27 +144,29 @@ https://bugzilla.mozilla.org/show_bug.cg
       //There is no onerror event associated with the WebHandler, and hence we need a setTimeout to check the status
       setTimeout(mailtoProtocolStatus, TIMEOUT_INTERVAL);
     }
   }
 
   mailtoProtocolStatus();
 
   // Test 7: wss protocol
-  var wss;
-  wss = new WebSocket("wss://example.com/tests/dom/security/test/mixedcontentblocker/file_main_bug803225_websocket");
+  // WebSocket tests are not supported on Android Yet. Bug 1566168.
+  if (AppConstants.platform !== "android") {
+    var wss;
+    wss = new WebSocket("wss://example.com/tests/dom/security/test/mixedcontentblocker/file_main_bug803225_websocket");
 
-  var status_wss = "started";
-  wss.onopen = function(e) {
-     status_wss = "opened";
-     wss.close();
-  }
-  wss.onclose = function(e) {
-    if(status_wss == "opened") {
-      parent.postMessage({"test": "wss", "msg": "resource with wss protocol loaded"}, "http://mochi.test:8888");
-    } else {
-      parent.postMessage({"test": "wss", "msg": "resource with wss protocol did not load"}, "http://mochi.test:8888");
+    var status_wss = "started";
+    wss.onopen = function(e) {
+       status_wss = "opened";
+       wss.close();
+    }
+    wss.onclose = function(e) {
+      if(status_wss == "opened") {
+        parent.postMessage({"test": "wss", "msg": "resource with wss protocol loaded"}, "http://mochi.test:8888");
+      } else {
+        parent.postMessage({"test": "wss", "msg": "resource with wss protocol did not load"}, "http://mochi.test:8888");
+      }
     }
   }
-
 </script>
 </body>
 </html>
--- a/dom/security/test/mixedcontentblocker/mochitest.ini
+++ b/dom/security/test/mixedcontentblocker/mochitest.ini
@@ -20,13 +20,12 @@ support-files =
   file_redirect_handler.sjs
 
 [test_main.html]
 fail-if = fission
 skip-if =
   (toolkit == 'android') || webrender || (verify && !debug && (os == 'linux')) || # Android: TIMED_OUT; bug 1402554
   fission # Crashes: @ mozilla::dom::BrowsingContextGroup::EnsureSubscribed(mozilla::dom::ContentParent*)
 [test_bug803225.html]
-skip-if =
-  toolkit == 'android' || (os=='linux' && bits==32) || headless #Android: TIMED_OUT; Linux32:bug 1324870; Headless:bug 1405870
+skip-if = (os=='linux' && bits==32) || headless # Linux32:bug 1324870; Headless:bug 1405870
 [test_frameNavigation.html]
-skip-if = fission || toolkit == 'android' || webrender || (debug && (os == 'linux' || os == 'win')) || (os == 'win' && !debug) # Android: TIMED_OUT; webrender: bug 1424752 # Bug 1391823; Bug 1353608
+skip-if = fission || webrender || (debug && (os == 'linux' || os == 'win')) || (os == 'win' && !debug) # webrender: bug 1424752 # Bug 1391823; Bug 1353608
 [test_redirect.html]
--- a/dom/security/test/mixedcontentblocker/test_bug803225.html
+++ b/dom/security/test/mixedcontentblocker/test_bug803225.html
@@ -6,16 +6,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 -->
 <head>
   <meta charset="utf-8">
   <title>Tests for Bug 803225</title>
   <script src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 
   <script>
+  const {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
+
   var counter = 0;
   var settings = [ [true, true], [true, false], [false, true], [false, false] ];
 
   var blockActive;
   var blockDisplay;
 
   //Cycle through 4 different preference settings.
   function changePrefs(callback) {
@@ -35,20 +37,24 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   var testsToRun = {
     /* https - Tests already run as part of bug 62178. */
     about: false,
     resource: false,
     unsafe_about: false,
     data_protocol: false,
     javascript: false,
-    mailto: false,
-    wss: false,
   };
 
+  if (AppConstants.platform !== "android") {
+    // WebSocket tests are not supported on Android Yet. Bug 1566168.
+    testsToRun.wss = false;
+    testsToRun.mailto = false;
+  }
+
   function log(msg) {
     document.getElementById("log").textContent += "\n" + msg;
   }
 
   function reloadFrame() {
     document.getElementById('framediv').innerHTML = '<iframe id="testHarness" src="https://example.com/tests/dom/security/test/mixedcontentblocker/file_main_bug803225.html"></iframe>';
   }