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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/workers/constructors/SharedWorker/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 <!-- 1 <!--
2 /* 2 /*
3 --> 3 -->
4 <!doctype html> 4 <!doctype html>
5 <title>same-origin checks</title> 5 <title>same-origin checks</title>
6 <link rel=help href="http://www.whatwg.org/html/#dom-sharedworker"> 6 <link rel=help href="http://www.whatwg.org/html/#dom-sharedworker">
7 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script> 8 <script src="/resources/testharnessreport.js"></script>
9 <div id="log"></div> 9 <div id="log"></div>
10 <script> 10 <script>
11 // Needed to prevent a race condition if a worker throws an exception that may o r may 11 // Needed to prevent a race condition if a worker throws an exception that may o r may
12 // not propogate to the window before the tests finish 12 // not propogate to the window before the tests finish
13 setup({allow_uncaught_exception: true}); 13 setup({allow_uncaught_exception: true});
14 14
15 function testSharedWorkerHelper(t, script) { 15 function testSharedWorkerHelper(t, script) {
16 try { 16 try {
17 var worker = new SharedWorker(script, ''); 17 var worker = new SharedWorker(script, '');
18 worker.onerror = t.step_func_done(function(e) { 18 worker.onerror = t.step_func_done(function(e) {
19 assert_true(e instanceof ErrorEvent); 19 assert_true(e instanceof Event);
20 }); 20 });
21 } catch (e) { 21 } catch (e) {
22 t.step_func_done(function(e) { assert_true(true); }); 22 t.step_func_done(function(e) { assert_true(true); });
23 } 23 }
24 } 24 }
25 25
26 test(function() { 26 test(function() {
27 assert_throws("SecurityError", function() { new SharedWorker('unsupported:', ' '); }); 27 assert_throws("SecurityError", function() { new SharedWorker('unsupported:', ' '); });
28 }, "unsupported_scheme"); 28 }, "unsupported_scheme");
29 29
(...skipping 28 matching lines...) Expand all
58 testSharedWorkerHelper(this, 'https://'+location.hostname+':8000/'); 58 testSharedWorkerHelper(this, 'https://'+location.hostname+':8000/');
59 }, "https_port_8000"); 59 }, "https_port_8000");
60 60
61 async_test(function(t) { 61 async_test(function(t) {
62 testSharedWorkerHelper(this, 'http://'+location.hostname+':8012/'); 62 testSharedWorkerHelper(this, 'http://'+location.hostname+':8012/');
63 }, "http_port_8012"); 63 }, "http_port_8012");
64 </script> 64 </script>
65 <!-- 65 <!--
66 */ 66 */
67 //--> 67 //-->
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698