OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <title>Event constructors</title> | 2 <title>Event constructors</title> |
3 <script src=../../../../resources/testharness.js></script> | 3 <script src=../../../../resources/testharness.js></script> |
4 <script src=../../../../resources/testharnessreport.js></script> | 4 <script src=../../../../resources/testharnessreport.js></script> |
5 <div id=log></div> | 5 <div id=log></div> |
6 <script> | 6 <script> |
7 test(function() { | 7 test(function() { |
8 assert_throws(new TypeError(), function() { | 8 assert_throws(new TypeError(), function() { |
9 new Event() | 9 new Event() |
10 }) | 10 }) |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 }) | 106 }) |
107 test(function() { | 107 test(function() { |
108 var ev = new CustomEvent("$", {detail: 54, sweet: "x", sweet2: "x", cancelable
:true}) | 108 var ev = new CustomEvent("$", {detail: 54, sweet: "x", sweet2: "x", cancelable
:true}) |
109 assert_equals(ev.type, "$") | 109 assert_equals(ev.type, "$") |
110 assert_equals(ev.bubbles, false) | 110 assert_equals(ev.bubbles, false) |
111 assert_equals(ev.cancelable, true) | 111 assert_equals(ev.cancelable, true) |
112 assert_equals(ev.sweet, undefined) | 112 assert_equals(ev.sweet, undefined) |
113 assert_equals(ev.detail, 54) | 113 assert_equals(ev.detail, 54) |
114 }) | 114 }) |
115 </script> | 115 </script> |
OLD | NEW |