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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/workers/constructors/Worker/same-origin.html

Issue 2695813009: Import wpt@503f5b5f78ec4e87d144f78609f363f0ed0ea8db (Closed)
Patch Set: Skip some tests Created 3 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 <!doctype html> 1 <!doctype html>
2 <meta charset=utf-8> 2 <meta charset=utf-8>
3 <title>same-origin checks; the script is in a script element</title> 3 <title>same-origin checks; the script is in a script element</title>
4 <link rel=help href="http://www.whatwg.org/html/#dom-worker"> 4 <link rel=help href="http://www.whatwg.org/html/#dom-worker">
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 <div id="log"></div> 7 <div id="log"></div>
8 <script> 8 <script>
9 // Needed to prevent a race condition if a worker throws an exception that may o r may 9 // Needed to prevent a race condition if a worker throws an exception that may o r may
10 // not propogate to the window before the tests finish 10 // not propogate to the window before the tests finish
11 setup({allow_uncaught_exception: true}); 11 setup({allow_uncaught_exception: true});
12 12
13 function testSharedWorkerHelper(t, script) { 13 function testSharedWorkerHelper(t, script) {
14 try { 14 try {
15 var worker = new SharedWorker(script, ''); 15 var worker = new SharedWorker(script, '');
16 worker.onerror = t.step_func_done(function(e) { 16 worker.onerror = t.step_func_done(function(e) {
17 assert_true(e instanceof ErrorEvent); 17 assert_true(e instanceof Event);
18 }); 18 });
19 } catch (e) { 19 } catch (e) {
20 t.step_func_done(function(e) { assert_true(true); }); 20 t.step_func_done(function(e) { assert_true(true); });
21 } 21 }
22 } 22 }
23 23
24 test(function() { 24 test(function() {
25 assert_throws("SecurityError", function() { new Worker('unsupported:'); }); 25 assert_throws("SecurityError", function() { new Worker('unsupported:'); });
26 }, "unsupported_scheme"); 26 }, "unsupported_scheme");
27 27
(...skipping 26 matching lines...) Expand all
54 54
55 async_test(function(t) { 55 async_test(function(t) {
56 testSharedWorkerHelper(t, 'http://'+location.hostname+':8012/'); 56 testSharedWorkerHelper(t, 'http://'+location.hostname+':8012/');
57 }, "http_post_8012"); 57 }, "http_post_8012");
58 58
59 async_test(function(t) { 59 async_test(function(t) {
60 testSharedWorkerHelper(t,'javascript:""'); 60 testSharedWorkerHelper(t,'javascript:""');
61 }, "javascript_url"); 61 }, "javascript_url");
62 62
63 </script> 63 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698