mirror of
https://github.com/servo/servo.git
synced 2025-10-02 17:49:16 +01:00
dom::Response implementation
This commit is contained in:
parent
569599d404
commit
faf32a7cfb
30 changed files with 402 additions and 124 deletions
|
@ -1,32 +0,0 @@
|
|||
[response-error.html]
|
||||
type: testharness
|
||||
[Throws RangeError when responseInit's status is 0]
|
||||
expected: FAIL
|
||||
|
||||
[Throws RangeError when responseInit's status is 100]
|
||||
expected: FAIL
|
||||
|
||||
[Throws RangeError when responseInit's status is 199]
|
||||
expected: FAIL
|
||||
|
||||
[Throws RangeError when responseInit's status is 600]
|
||||
expected: FAIL
|
||||
|
||||
[Throws RangeError when responseInit's status is 1000]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when responseInit's statusText is \n]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when responseInit's statusText is Ā]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when building a response with body and a body status of 204]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when building a response with body and a body status of 205]
|
||||
expected: FAIL
|
||||
|
||||
[Throws TypeError when building a response with body and a body status of 304]
|
||||
expected: FAIL
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
[response-init-001.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[Check default value for body attribute]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
[response-static-redirect.html]
|
||||
type: testharness
|
||||
[Check default redirect response]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 301]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 302]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 303]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 307]
|
||||
expected: FAIL
|
||||
|
||||
[Check response returned by static method redirect(), status = 308]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid url to redirect()]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid status to redirect(), status = 200]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid status to redirect(), status = 309]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid status to redirect(), status = 400]
|
||||
expected: FAIL
|
||||
|
||||
[Check error returned when giving invalid status to redirect(), status = 500]
|
||||
expected: FAIL
|
||||
|
|
@ -148,6 +148,7 @@ test_interfaces([
|
|||
"RadioNodeList",
|
||||
"Range",
|
||||
"Request",
|
||||
"Response",
|
||||
"Screen",
|
||||
"Storage",
|
||||
"StorageEvent",
|
||||
|
|
|
@ -90,6 +90,7 @@ test_interfaces([
|
|||
"RadioNodeList",
|
||||
"Range",
|
||||
"Request",
|
||||
"Response",
|
||||
"Screen",
|
||||
"Storage",
|
||||
"StorageEvent",
|
||||
|
|
|
@ -60,4 +60,4 @@
|
|||
}, "Check " + attributeName + " init values and associated getter");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
var url = "http://test.url:1234/";
|
||||
test(function() {
|
||||
redirectResponse = Response.redirect(url);
|
||||
assert_equals(redirectResponse.status, 302, "Default redictect status is 302");
|
||||
assert_equals(redirectResponse.status, 302, "Default redirect status is 302");
|
||||
assert_equals(redirectResponse.headers.get("Location"), url,
|
||||
"redirected response has Location header with the correct url");
|
||||
}, "Check default redirect response");
|
||||
|
@ -23,7 +23,7 @@
|
|||
redirectStatus.forEach(function(status) {
|
||||
test(function() {
|
||||
redirectResponse = Response.redirect(url, status);
|
||||
assert_equals(redirectResponse.status, status, "Redictect status is " + status);
|
||||
assert_equals(redirectResponse.status, status, "Redirect status is " + status);
|
||||
}, "Check response returned by static method redirect(), status = " + status);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue