Backed out changeset aa013ffd209b (bug 888974) for mochitest-4 failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 07 Nov 2013 10:47:37 -0500
changeset 168581 f2ac793ec024a50940e57016261f60d3def02db5
parent 168580 5c4ae2a331c4184851484e25ea16332832838fe5
child 168582 8196cbbcadcd65ad155d8dc2f01cdffd423330eb
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs888974
milestone28.0a1
backs outaa013ffd209b94cb06151a39c5212884cefce0aa
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
Backed out changeset aa013ffd209b (bug 888974) for mochitest-4 failures.
dom/workers/test/mochitest.ini
dom/workers/test/test_xhr_headers.html
dom/workers/test/test_xhr_headers_server.sjs
dom/workers/test/test_xhr_headers_worker.js
--- a/dom/workers/test/mochitest.ini
+++ b/dom/workers/test/mochitest.ini
@@ -34,18 +34,16 @@ support-files =
   relativeLoad_worker2.js
   rvals_worker.js
   sharedWorker_sharedWorker.js
   simpleThread_worker.js
   suspend_iframe.html
   suspend_worker.js
   terminate_worker.js
   testXHR.txt
-  test_xhr_headers_server.sjs
-  test_xhr_headers_worker.js
   threadErrors_worker1.js
   threadErrors_worker2.js
   threadErrors_worker3.js
   threadErrors_worker4.js
   threadTimeouts_worker.js
   throwingOnerror_worker.js
   transferable_worker.js
   urlApi_worker.js
@@ -100,15 +98,14 @@ support-files =
 [test_throwingOnerror.html]
 [test_transferable.html]
 [test_url.html]
 [test_urlApi.html]
 [test_workersDisabled.html]
 [test_xhr.html]
 [test_xhr2.html]
 [test_xhrAbort.html]
-[test_xhr_headers.html]
 [test_xhr_implicit_cancel.html]
 [test_xhr_parameters.html]
 [test_xhr_parameters.js]
 [test_xhr_system.html]
 [test_xhr_system.js]
 [test_url_exceptions.html]
deleted file mode 100644
--- a/dom/workers/test/test_xhr_headers.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<!DOCTYPE HTML>
-<html>
-  <head>
-    <title>Test for XHR Headers</title>
-    <script src="/tests/SimpleTest/SimpleTest.js">
-    </script>
-    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
-  </head>
-  <body>
-    <p id="display"></p>
-    <div id="content" style="display: none"></div>
-    <pre id="test">
-      <script class="testbody">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-var path =
-  location.pathname.substring(0, location.pathname.lastIndexOf("/") + 1);
-var filenamePrefix = "test_xhr_headers_";
-var serverFilename = filenamePrefix + "server.sjs";
-var workerFilename = filenamePrefix + "worker.js";
-var otherHost = "example.com";
-
-info("Informing server about the current host");
-
-var xhr = new XMLHttpRequest();
-xhr.open("POST", path + serverFilename);
-xhr.setRequestHeader("options-host", otherHost);
-xhr.onreadystatechange = function() {
-  if (xhr.readyState == 4) {
-    info("Launching worker");
-
-    var worker = new Worker(path + workerFilename);
-    worker.postMessage("http://" + otherHost + path + serverFilename);
-
-    worker.onmessage = function(event) {
-      ok(event.data.response === "", "Worker responded, saw no response");
-
-      var loopCount = 0;
-
-      function checkServer() {
-        var xhr2 = new XMLHttpRequest();
-        xhr2.open("GET", path + serverFilename);
-        xhr2.onreadystatechange = function() {
-          if (xhr2.readyState == 4) {
-            if (xhr2.responseText) {
-              is(xhr2.responseText,
-                 "Success: expected OPTIONS request with '" +
-                 event.data.header + "' header",
-                 "Server saw expected requests");
-              SimpleTest.finish();
-            } else if (++loopCount < 30) {
-              setTimeout(checkServer, 1000);
-            } else {
-              ok(false, "Server never saw any requests");
-              SimpleTest.finish();
-            }
-          }
-        };
-
-        info("Checking server status (" + loopCount + ")");
-        xhr2.send();
-      }
-
-      checkServer();
-    };
-
-    worker.onerror = function(event) {
-      ok(false, "Worker had an error: '" + event.message + "'");
-      event.preventDefault();
-      SimpleTest.finish();
-    };
-  }
-};
-xhr.send();
-
-      </script>
-    </pre>
-  </body>
-</html>
deleted file mode 100644
--- a/dom/workers/test/test_xhr_headers_server.sjs
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-"use strict";
-
-function handleRequest(request, response) {
-  switch (request.method) {
-    case "POST":
-      try {
-        var optionsHost = request.getHeader("options-host");
-      } catch(e) { }
-
-      if (optionsHost) {
-        setState("postHost", request.host);
-        setState("optionsHost", optionsHost);
-        return;
-      }
-      break;
-
-    case "OPTIONS":
-      if (getState("optionsHost") == request.host) {
-        try {
-          var optionsHeader =
-            request.getHeader("Access-Control-Request-Headers");
-        } catch(e) { }
-        setState("optionsHeader", "'" + optionsHeader + "'");
-      }
-      break;
-
-    case "GET":
-      response.setHeader("Cache-Control", "no-cache", false);
-      response.setHeader("Content-Type", "text/plain", false);
-
-      if (getState("postHost") == request.host) {
-        var result = getState("optionsHeader");
-        if (result) {
-          response.write("Success: expected OPTIONS request with " + result +
-                         " header");
-        } else if (getState("badGet") == 1) {
-          response.write("Error: unexpected GET request");
-        }
-      } else {
-        setState("badGet", "1");
-        response.write("Error: this response should never be seen");
-      }
-      return;
-  }
-
-  response.setStatusLine(request.httpVersion, 501, "Not Implemented");
-}
deleted file mode 100644
--- a/dom/workers/test/test_xhr_headers_worker.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-"use strict";
-
-var customHeader = "custom-key";
-var customHeaderValue = "custom-key-value";
-
-self.onmessage = function(event) {
-  var xhr = new XMLHttpRequest();
-  xhr.open("GET", event.data, false);
-  xhr.setRequestHeader(customHeader, customHeaderValue);
-  xhr.send();
-  postMessage({ response: xhr.responseText, header: customHeader });
-}