From d08f2a65fc8534a649aa3ac330c1918fc7f38d85 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 7 Nov 2013 10:47:37 -0500 Subject: [PATCH] Backed out changeset aa013ffd209b (bug 888974) for mochitest-4 failures. --- dom/workers/test/mochitest.ini | 3 - dom/workers/test/test_xhr_headers.html | 85 -------------------- dom/workers/test/test_xhr_headers_server.sjs | 51 ------------ dom/workers/test/test_xhr_headers_worker.js | 16 ---- 4 files changed, 155 deletions(-) delete mode 100644 dom/workers/test/test_xhr_headers.html delete mode 100644 dom/workers/test/test_xhr_headers_server.sjs delete mode 100644 dom/workers/test/test_xhr_headers_worker.js diff --git a/dom/workers/test/mochitest.ini b/dom/workers/test/mochitest.ini index 0af06f45e54..ce42a9cb05d 100644 --- a/dom/workers/test/mochitest.ini +++ b/dom/workers/test/mochitest.ini @@ -39,8 +39,6 @@ support-files = 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 @@ -105,7 +103,6 @@ support-files = [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] diff --git a/dom/workers/test/test_xhr_headers.html b/dom/workers/test/test_xhr_headers.html deleted file mode 100644 index 8a856a943fd..00000000000 --- a/dom/workers/test/test_xhr_headers.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Test for XHR Headers - - - - -

- -
-      
-    
- - diff --git a/dom/workers/test/test_xhr_headers_server.sjs b/dom/workers/test/test_xhr_headers_server.sjs deleted file mode 100644 index 045c999b997..00000000000 --- 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"); -} diff --git a/dom/workers/test/test_xhr_headers_worker.js b/dom/workers/test/test_xhr_headers_worker.js deleted file mode 100644 index af88b83ca56..00000000000 --- 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 }); -}