| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../js-test-resources/js-test-pre.js"></script> | 4 <script src="../../js-test-resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script type="text/javascript"> | 7 <script type="text/javascript"> |
| 8 window.jsTestIsAsync = true; | 8 window.jsTestIsAsync = true; |
| 9 description('Test for bug 41210: Cross Origin XMLHttpRequest can not expose head
ers indicated in Access-Control-Expose-Headers HTTP Response Header.'); | 9 description('Test for bug 41210: Cross Origin XMLHttpRequest can not expose head
ers indicated in Access-Control-Expose-Headers HTTP Response Header.'); |
| 10 var xhr = new XMLHttpRequest(); | 10 var xhr = new XMLHttpRequest(); |
| 11 xhr.onreadystatechange=function() { | 11 xhr.onreadystatechange=function() { |
| 12 if (xhr.readyState==4) { | 12 if (xhr.readyState==4) { |
| 13 shouldBe("xhr.getResponseHeader(\"X-FOO\")","'BAR'"); | 13 shouldBe("xhr.getResponseHeader(\"X-FOO\")","'BAR'"); |
| 14 shouldBe("xhr.getResponseHeader(\"x-foo\")","'BAR'"); | 14 shouldBe("xhr.getResponseHeader(\"x-foo\")","'BAR'"); |
| 15 shouldBeNull("xhr.getResponseHeader(\"X-TEST\")"); | 15 shouldBeNull("xhr.getResponseHeader(\"X-TEST\")"); |
| 16 finishJSTest(); | 16 finishJSTest(); |
| 17 } | 17 } |
| 18 } | 18 } |
| 19 var url = "http://localhost:8000/xmlhttprequest/resources/access-control-respons
e-with-expose-headers.php"; | 19 var url = "http://localhost:8000/xmlhttprequest/resources/access-control-respons
e-with-expose-headers.php"; |
| 20 xhr.open("GET",url); | 20 xhr.open("GET",url); |
| 21 xhr.send(null); | 21 xhr.send(null); |
| 22 </script> | 22 </script> |
| 23 <script src="../../js-test-resources/js-test-post.js"></script> | |
| 24 </body> | 23 </body> |
| 25 </html> | 24 </html> |
| OLD | NEW |