Bug 1280692: Remove redundant sendBeacon tests due to spec update of using 'no-cors' per default. r=sicking
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Tue, 26 Jul 2016 13:46:48 +0200
changeset 346746 08079892bec5cb1744ae48316bc2cd4378a679db
parent 346745 670d4c99c1c7310525a5820e3dfd65569b063e7d
child 346747 c5b0b62fc39ea439f997b3c180872ad93e509322
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssicking
bugs1280692
milestone50.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 1280692: Remove redundant sendBeacon tests due to spec update of using 'no-cors' per default. r=sicking
dom/tests/mochitest/beacon/mochitest.ini
dom/tests/mochitest/beacon/test_beaconPreflight.html
dom/tests/mochitest/beacon/test_beaconPreflightFailure.html
--- a/dom/tests/mochitest/beacon/mochitest.ini
+++ b/dom/tests/mochitest/beacon/mochitest.ini
@@ -3,14 +3,12 @@ skip-if = buildapp == 'b2g'
 support-files = beacon-frame.html
                 beacon-handler.sjs
                 beacon-preflight-handler.sjs
                 beacon-originheader-handler.sjs
                 beacon-redirect-handler.sjs
 
 [test_beacon.html]
 [test_beaconFrame.html]
-[test_beaconPreflight.html]
-[test_beaconPreflightFailure.html]
 [test_beaconPreflightWithCustomContentType.html]
 [test_beaconContentPolicy.html]
 [test_beaconOriginHeader.html]
 [test_beaconRedirect.html]
deleted file mode 100644
--- a/dom/tests/mochitest/beacon/test_beaconPreflight.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=936340
--->
-<head>
-  <title>Test for Bug 936340</title>
-  <script type="text/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=936340">Mozilla Bug 936340</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var beaconUrl = "http://example.com/tests/dom/tests/mochitest/beacon/beacon-preflight-handler.sjs?beacon";
-
-var intervalID = null;
-
-function queryIfBeaconSucceeded() {
-  clearInterval(intervalID);
-  var xhr = new XMLHttpRequest();
-  xhr.open("GET", "beacon-preflight-handler.sjs?verify", true);
-  xhr.onload = function() {
-    is(xhr.responseText, "green", "SendBeacon should have succeeded after preflight!");
-    SimpleTest.finish();
-  };
-  xhr.onerror = function() {
-    ok(false, "xhr request returned error");
-    SimpleTest.finish();
-  };
-  xhr.send();
-}
-
-// not enabled by default yet.
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({'set': [["beacon.enabled", true]]}, beginTest);
-
-function beginTest() {
-  var abv = new Uint8Array([0,1,2,3]);
-  var sent = navigator.sendBeacon(beaconUrl, abv);
-  ok(sent, "sending the beacon should start successfully");
-
-  // we have to make sure sending the beacon did not fail, so
-  // we have to wait for 2 seconds before we can query the result.
-  intervalID = setInterval(queryIfBeaconSucceeded, 2000);
-}
-
-</script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/tests/mochitest/beacon/test_beaconPreflightFailure.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1207556
--->
-<head>
-  <title>Test for Bug 1207556</title>
-  <script type="text/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=1207556">Mozilla Bug 1207556</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var beaconUrl = "http://example.com/tests/dom/tests/mochitest/beacon/beacon-preflight-handler.sjs?fail";
-
-var intervalID = null;
-
-function queryIfBeaconSucceeded() {
-  clearInterval(intervalID);
-  var xhr = new XMLHttpRequest();
-  xhr.open("GET", "beacon-preflight-handler.sjs?verify", true);
-  xhr.onload = function() {
-    is(xhr.responseText, "green", "SendBeacon should have failed because of a failed preflight!");
-    SimpleTest.finish();
-  };
-  xhr.onerror = function() {
-    ok(false, "xhr request returned error");
-    SimpleTest.finish();
-  };
-  xhr.send();
-}
-
-// not enabled by default yet.
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({'set': [["beacon.enabled", true]]}, beginTest);
-
-function beginTest() {
-  var abv = new Uint8Array([0,1,2,3]);
-  var sent = navigator.sendBeacon(beaconUrl, abv);
-  ok(sent, "sending the beacon should start successfully");
-
-  // we have to make sure sending the beacon did not fail, so
-  // we have to wait for 2 seconds before we can query the result.
-  intervalID = setInterval(queryIfBeaconSucceeded, 2000);
-}
-
-</script>
-</pre>
-</body>
-</html>