Test changes for bug 458248
git-svn-id: svn://10.0.0.236/trunk@255116 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -184,6 +184,9 @@ _TEST_FILES = test_bug5141.html \
|
||||
bug461735-redirect2.sjs \
|
||||
bug461735-post-redirect.js \
|
||||
test_bug461735.html \
|
||||
test_bug458248.html \
|
||||
file_bug458248.xml \
|
||||
file_bug458248.xml^headers^ \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
||||
1
mozilla/content/base/test/file_bug458248.xml
Normal file
1
mozilla/content/base/test/file_bug458248.xml
Normal file
@@ -0,0 +1 @@
|
||||
<out>hello</out>
|
||||
2
mozilla/content/base/test/file_bug458248.xml^headers^
Normal file
2
mozilla/content/base/test/file_bug458248.xml^headers^
Normal file
@@ -0,0 +1,2 @@
|
||||
HTTP 301 Moved Permanently
|
||||
Location: http://example.com/tests/content/base/test/file_bug458248.xml
|
||||
@@ -53,7 +53,7 @@ for (i = 0; i < failFiles.length; ++i) {
|
||||
}
|
||||
if (!didthrow) {
|
||||
is(xhr.status, 301, "wrong status");
|
||||
is(xhr.responseText, "redirect file\n", "wrong response");
|
||||
is(xhr.responseText, "", "wrong response");
|
||||
}
|
||||
else {
|
||||
ok(1, "should have thrown or given incorrect result");
|
||||
|
||||
28
mozilla/content/base/test/test_bug458248.html
Normal file
28
mozilla/content/base/test/test_bug458248.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for Bug 458248</title>
|
||||
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
||||
<script type="text/javascript" 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" type="text/javascript">
|
||||
|
||||
xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'file_bug458248.xml', false);
|
||||
xhr.send(null);
|
||||
is(xhr.responseXML, null);
|
||||
is(xhr.responseText, "");
|
||||
is(xhr.getAllResponseHeaders(), "");
|
||||
is(xhr.getResponseHeader('Location'), "");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user