Bug 1261472: fix incorrect test assertion in 'getResponse: don't expose x-nonexposed' and 'Combined testing of cors response headers'; r?ehsan draft
authorDecky Coss <coss@cosstropolis.com>
Mon, 23 May 2016 13:48:33 -0400
changeset 369808 a534faa1bcf2b4e96984fb2038f34cb1c08c0ab0
parent 369317 16663eb3dcfa759f25b5e27b101bc79270c156f2
child 521619 41aa53fadb8e8acee13e77087d6ba7c09697873b
push id18916
push userbmo:coss@cosstropolis.com
push dateMon, 23 May 2016 18:01:26 +0000
reviewersehsan
bugs1261472
milestone49.0a1
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
testing/web-platform/meta/cors/response-headers.htm.ini
testing/web-platform/tests/cors/response-headers.htm
--- 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)