зеркало из https://github.com/mozilla/gecko-dev.git
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 --HG-- extra : transplant_source : %A54%FA%A1%BC%F2%B4%E9i%84%FB%208%F3L%B1%C0%8C%0A%B0
This commit is contained in:
Родитель
eec042e84e
Коммит
17fddfe3c0
|
@ -2,7 +2,3 @@
|
||||||
type: testharness
|
type: testharness
|
||||||
[getResponseHeader: Combined testing of cors response headers]
|
[getResponseHeader: Combined testing of cors response headers]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[getResponse: don't expose x-nonexposed]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ async_test("getResponseHeader: Combined testing of cors response headers")
|
||||||
}
|
}
|
||||||
if (client.readyState > 1)
|
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("x-custom-header-empty"), "", 'x-custom-header-empty')
|
||||||
assert_equals(client.getResponseHeader("set-cookie"), null)
|
assert_equals(client.getResponseHeader("set-cookie"), null)
|
||||||
assert_equals(client.getResponseHeader("set-cookie2"), null)
|
assert_equals(client.getResponseHeader("set-cookie2"), null)
|
||||||
|
@ -86,7 +86,7 @@ test(function() {
|
||||||
var client = new XMLHttpRequest()
|
var client = new XMLHttpRequest()
|
||||||
client.open('GET', CROSSDOMAIN + 'resources/cors-headers.asis', false)
|
client.open('GET', CROSSDOMAIN + 'resources/cors-headers.asis', false)
|
||||||
client.send(null)
|
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')
|
assert_equals(client.getResponseHeader("x-nonexposed"), null, 'x-nonexposed')
|
||||||
}, "getResponse: don't expose x-nonexposed")
|
}, "getResponse: don't expose x-nonexposed")
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче