OLD | NEW |
| (Empty) |
1 <!-- | |
2 var results = []; | |
3 try { | |
4 self.onconnect = 1; | |
5 results.push(String(onconnect)); | |
6 } catch(e) { | |
7 results.push(''+e); | |
8 } | |
9 try { | |
10 self.onconnect = {handleEvent:function(){}}; | |
11 results.push(String(onconnect)); | |
12 } catch(e) { | |
13 results.push(''+e); | |
14 } | |
15 var f = function(e) { | |
16 results.push(e.data); | |
17 e.ports[0].postMessage(results); | |
18 }; | |
19 onconnect = f; | |
20 results.push(typeof onconnect); | |
21 /* | |
22 --> | |
23 <!doctype html> | |
24 <title>onconnect</title> | |
25 <script src="/resources/testharness.js"></script> | |
26 <script src="/resources/testharnessreport.js"></script> | |
27 <div id="log"></div> | |
28 <script> | |
29 async_test(function() { | |
30 var w1 = new SharedWorker('#', ''); | |
31 w1.port.addEventListener('message', this.step_func(function(e) { | |
32 assert_array_equals(e.data, ['null', 'null', 'function', '']); | |
33 }), false); | |
34 w1.port.start(); | |
35 }); | |
36 </script> | |
37 <!-- | |
38 */ | |
39 //--> | |
OLD | NEW |