Bug 1261472: fix incorrect test assertion in 'getResponse: don't expose x-nonexposed' and 'Combined testing of cors response headers'; r?ehsan
MozReview-Commit-ID: HD0TBJcnxst
--- a/testing/web-platform/meta/cors/response-headers.htm.ini
+++ b/testing/web-platform/meta/cors/response-headers.htm.ini
@@ -1,8 +1,4 @@
[response-headers.htm]
type: testharness
[getResponseHeader: Combined testing of cors response headers]
expected: FAIL
-
- [getResponse: don't expose x-nonexposed]
- expected: FAIL
-
--- a/testing/web-platform/tests/cors/response-headers.htm
+++ b/testing/web-platform/tests/cors/response-headers.htm
@@ -62,17 +62,17 @@ async_test("getResponseHeader: Combined
client.onreadystatechange = this.step_func(function()
{
if (client.readyState == 1)
{
assert_equals(client.getResponseHeader("x-custom-header"), null, 'x-custom-header')
}
if (client.readyState > 1)
{
- assert_equals(client.getResponseHeader("x-custom-header"), "test", 'x-custom-header')
+ assert_equals(client.getResponseHeader("x-custom-header"), "test, test", 'x-custom-header')
assert_equals(client.getResponseHeader("x-custom-header-empty"), "", 'x-custom-header-empty')
assert_equals(client.getResponseHeader("set-cookie"), null)
assert_equals(client.getResponseHeader("set-cookie2"), null)
assert_equals(client.getResponseHeader("x-non-existent-header"), null)
assert_equals(client.getResponseHeader("x-nonexposed"), null)
}
if (client.readyState == 4)
{
@@ -81,17 +81,17 @@ async_test("getResponseHeader: Combined
})
client.send()
})
test(function() {
var client = new XMLHttpRequest()
client.open('GET', CROSSDOMAIN + 'resources/cors-headers.asis', false)
client.send(null)
- assert_equals(client.getResponseHeader("x-custom-header"), "test", 'x-custom-header')
+ assert_equals(client.getResponseHeader("x-custom-header"), "test, test", 'x-custom-header')
assert_equals(client.getResponseHeader("x-nonexposed"), null, 'x-nonexposed')
}, "getResponse: don't expose x-nonexposed")
test(function() {
var client = new XMLHttpRequest()
client.open('GET', CROSSDOMAIN + 'resources/cors-headers.asis', false)
client.send(null)