| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 function report(message) { | 2 function report(message) { |
| 3 window.opener.postMessage(message, '*'); | 3 window.opener.postMessage(message, '*'); |
| 4 } | 4 } |
| 5 | 5 |
| 6 var xhr = new XMLHttpRequest(); | 6 var xhr = new XMLHttpRequest(); |
| 7 xhr.onload = function() { | 7 xhr.onload = function() { |
| 8 report('FAIL: XHR succeeded unexpectedly'); | 8 report('FAIL: XHR succeeded unexpectedly'); |
| 9 } | 9 } |
| 10 xhr.onerror = function() { | 10 xhr.onerror = function() { |
| 11 report('DONE'); | 11 report('DONE'); |
| 12 }; | 12 }; |
| 13 xhr.open("POST", "http://127.0.0.1:8000/xmlhttprequest/resources/access-control-
allow-lists.php?origin=*", true); | 13 xhr.open("POST", "http://example.test:8000/xmlhttprequest/resources/access-contr
ol-allow-lists.php?origin=*", true); |
| 14 xhr.send("foo"); | 14 xhr.send("foo"); |
| 15 </script> | 15 </script> |
| OLD | NEW |