access-control-basic-allow-access-control-origin-header.any.js (513B)
1 // META: title=Access control test with origin header 2 // META: script=/common/get-host-info.sub.js 3 4 async_test(function(test) { 5 const xhr = new XMLHttpRequest; 6 7 xhr.open("GET", get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/access-control-origin-header.py", false); 8 xhr.send(); 9 10 assert_equals(xhr.responseText, "PASS: Cross-domain access allowed.\n" + 11 "HTTP_ORIGIN: " + get_host_info().HTTP_ORIGIN); 12 test.done(); 13 }, "Access control test with origin header");