Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-worker-onerror-no-cors.php |
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-worker-onerror-no-cors.php b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-worker-onerror-no-cors.php |
index 2c34eadf282fdcc48a35aa230ffcb136677ffcab..43d07040abb64e094a9665f86f65f672f4a77634 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-worker-onerror-no-cors.php |
+++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cross-origin-worker-onerror-no-cors.php |
@@ -4,19 +4,26 @@ header("Suborigin: foobar"); |
<!DOCTYPE html> |
<html> |
<head> |
- <script> |
- window.jsTestIsAsync = true; |
- window.isOnErrorTest = true; |
- </script> |
- <script src="/js-test-resources/js-test.js"></script> |
+<meta charset="utf-8"> |
+<script> |
+window.jsTestIsAsync = true; |
+window.isOnErrorTest = true; |
+</script> |
+<script src="/js-test-resources/js-test.js"></script> |
</head> |
<body> |
<script> |
- description("Ensure that scripts imported into a Worker from cross-origin hosts trigger sanitized onerror messages."); |
+description('Ensure that scripts imported into a Worker from cross-origin hosts trigger sanitized onerror messages.'); |
- var worker; |
- shouldThrow('worker = new Worker("/workers/resources/worker-importscripts-onerror-sameorigin.js")', '"SecurityError: Failed to construct \'Worker\': Script at \'http://127.0.0.1:8000/workers/resources/worker-importscripts-onerror-sameorigin.js\' cannot be accessed from origin \'http-so://foobar.127.0.0.1:8000\'."'); |
- finishJSTest(); |
- </script> |
+var worker; |
+var worker_path = |
+ '/workers/resources/worker-importscripts-onerror-sameorigin.js'; |
+shouldThrow( |
+ 'worker = new Worker("' + worker_path + '")', |
+ '"SecurityError: Failed to construct \'Worker\': Script at ' + |
+ '\'http://127.0.0.1:8000' + worker_path + |
+ '\' cannot be accessed from origin \'http-so://foobar.127.0.0.1:8000\'."'); |
+finishJSTest(); |
+</script> |
</body> |
</html> |