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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/workers/semantics/reporting-errors/004.html

Issue 2418853003: Worker: Import "imported/wpt/workers" tests (Retry) (Closed)
Patch Set: rebase Created 4 years, 2 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
(Empty)
1 <!--
2 var i = 0;
3 onconnect = function (e) {
4 i++;
5 setTimeout(function() { e.ports[0].postMessage(i); }, 250);
6 y(); // will "report the error"
7 }
8
9 /*
10 -->
11 <!doctype html>
12 <title>shared worker in two documents and window.onerror</title>
13 <script src="/resources/testharness.js"></script>
14 <script src="/resources/testharnessreport.js"></script>
15 <div id=log></div>
16 <script>
17 setup({allow_uncaught_exception:true});
18 var t = async_test(function() {
19 window.onerror = this.step_func(function(a) {
20 assert_unreached('(outer) window.onerror invoked: ' + a);
21 });
22 var worker = new SharedWorker('#', '');
23 worker.addEventListener('error', this.step_func(function(e) {
24 assert_unreached('(outer) error on worker');
25 }), false);
26 worker.port.addEventListener('error', this.step_func(function(e) {
27 assert_unreached('(outer) error on port');
28 }), false);
29 worker.port.onmessage = this.step_func(function(e) {
30 assert_equals(e.data, 1);
31 var iframe = document.createElement('iframe');
32 iframe.src = '004-1.html';
33 document.body.appendChild(iframe);
34 });
35 });
36 </script>
37 <!--
38 */
39 //-->
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698