Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-header-sorted.html

Issue 875363002: Sort header names in Access-Control-Request-Headers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tyoshino's comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 <p>Test for bug 75089: Access-Control-Request-Headers values should be lowercase .</p> 3 <p>Test for bug 452391: Header names in Access-Control-Request-Headers must be s orted.</p>
4 <script> 4 <script>
5 if (window.testRunner) { 5 if (window.testRunner) {
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 testRunner.waitUntilDone(); 7 testRunner.waitUntilDone();
8 } 8 }
9 9
10 function sendRequest() 10 function sendRequest()
11 { 11 {
12 var xhr = new XMLHttpRequest; 12 var xhr = new XMLHttpRequest;
13 xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-contr ol-preflight-request-header-lowercase.php"); 13 xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-contr ol-preflight-request-header-sorted.php");
14 xhr.setRequestHeader("X-Custom-Header", "foobar"); 14 xhr.setRequestHeader("X-Custom-Test", "foobar");
15 xhr.setRequestHeader("X-Custom-ua", "foobar");
16 xhr.setRequestHeader("X-Custom-V", "foobar");
17 xhr.setRequestHeader("X-Custom-s", "foobar");
18 xhr.setRequestHeader("X-Custom-U", "foobar");
15 xhr.onerror = function() { 19 xhr.onerror = function() {
16 document.body.appendChild(document.createTextNode("FAIL: onerror called" )); 20 document.body.appendChild(document.createTextNode("FAIL: onerror called" ));
17 if (window.testRunner) 21 if (window.testRunner)
18 testRunner.notifyDone(); 22 testRunner.notifyDone();
19 } 23 }
20 24
21 xhr.onreadystatechange=function() { 25 xhr.onreadystatechange=function() {
22 if (xhr.readyState==4) { 26 if (xhr.readyState==4) {
23 document.body.appendChild(document.createTextNode(xhr.responseText)) ; 27 document.body.appendChild(document.createTextNode(xhr.responseText)) ;
24 if (window.testRunner) 28 if (window.testRunner)
25 testRunner.notifyDone(); 29 testRunner.notifyDone();
26 } 30 }
27 } 31 }
28 xhr.send(); 32 xhr.send();
29 } 33 }
30 sendRequest(); 34 sendRequest();
31 </script> 35 </script>
32 </body> 36 </body>
33 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698