| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="/js-test-resources/js-test.js"></script> |
| <script> |
| description("Tests that a same-origin script load succeeds if the server blocks cross-origin loads with a 'From-Origin: same' response header."); |
| jsTestIsAsync = true; |
| |
| function scriptLoadError() { |
| testFailed("Timeout fired without script onload event fired."); |
| finishJSTest(); |
| } |
| |
| function scriptLoadSuccess() { |
| testPassed("Script load succeeded."); |
| finishJSTest(); |
| } |
| </script> |
| </head> |
| <body> |
| <script src="http://127.0.0.1:8000/from-origin/resources/script.php?fromOrigin=same" onload="scriptLoadSuccess()" onerror="scriptLoadError()"></script> |
| </body> |
| </html> |