OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> |
| 3 <title>'message' event properties</title> |
| 4 <link rel=help href="http://www.whatwg.org/html/#dom-dedicatedworkerglobalscope-
postmessage"> |
| 5 <script src=/resources/testharness.js></script> |
| 6 <script src=/resources/testharnessreport.js></script> |
| 7 <div id=log></div> |
| 8 <script> |
| 9 async_test("Properties of the 'message' event").step(function() { |
| 10 var worker = new Worker("message-event.js"); |
| 11 worker.onmessage = this.step_func_done(function (evt) { |
| 12 assert_class_string(evt, "MessageEvent"); |
| 13 assert_equals(evt.type, "message"); |
| 14 assert_false(evt.bubbles, "bubbles should be false"); |
| 15 assert_false(evt.cancelable, "cancelable should be false"); |
| 16 assert_equals(evt.data, "test"); |
| 17 assert_equals(evt.origin, "", "origin"); |
| 18 assert_equals(evt.lastEventId, "", "lastEventId"); |
| 19 assert_equals(evt.source, null, "source"); |
| 20 assert_array_equals(evt.ports, [], "ports"); |
| 21 }); |
| 22 }); |
| 23 </script> |
OLD | NEW |