Backed out changeset fc765663d8f8 (bug 1011748)

This commit is contained in:
Carsten "Tomcat" Book 2014-06-16 10:55:32 +02:00
parent 63b2baee9a
commit a3e688f2d7
4 changed files with 0 additions and 68 deletions

View File

@ -1,4 +0,0 @@
// Function to indicate HTTP 200 OK after redirect from file_bug1011748_redirect.sjs
function handleRequest(request, response) {
response.setStatusLine(null, 200, "OK");
}

View File

@ -1,5 +0,0 @@
// SJS handler to redirect the XMLHttpRequest object to file_bug1011748_OK.sjs
function handleRequest(request, response) {
response.setStatusLine(null, 302, "Moved Temporarily");
response.setHeader("Location", "file_bug1011748_OK.sjs", false);
}

View File

@ -648,5 +648,3 @@ support-files = bug444546.sjs
[test_bug503473.html]
disabled = Disabled due to making the harness time out
support-files = file_bug503473-frame.sjs
[test_bug1011748.html]
support-files = file_bug1011748_redirect.sjs file_bug1011748_OK.sjs

View File

@ -1,57 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1011748
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1011748</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 1011748 **/
"use strict";
var observer = {
observe: function (aSubject, aTopic, aData) {
try {
var channel = aSubject.QueryInterface(SpecialPowers.Ci.nsIHttpChannel);
channel.getResponseHeader("Location");
} catch (e) {
return;
}
statusTexts.push(xhr.statusText);
}
};
var statusTexts = [];
SpecialPowers.addObserver(observer, "http-on-examine-response", false);
SimpleTest.waitForExplicitFinish();
var xhr = new XMLHttpRequest();
xhr.addEventListener("load", function() {
statusTexts.push(this.statusText);
SpecialPowers.removeObserver(observer, "http-on-examine-response");
is(statusTexts[0], "", "Empty statusText value for HTTP 302");
is(statusTexts[1], "OK", "OK statusText value for the redirect.");
SimpleTest.finish();
});
xhr.open("GET", "file_bug1011748_redirect.sjs", true);
xhr.send();
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1011748">Mozilla Bug 1011748</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>