| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <title>Event propagation tests</title> | 2 <title>Event propagation tests</title> |
| 3 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name> | 3 <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name> |
| 4 <div id=log></div> | 4 <div id=log></div> |
| 5 <script src=/resources/testharness.js></script> | 5 <script src=/resources/testharness.js></script> |
| 6 <script src=/resources/testharnessreport.js></script> | 6 <script src=/resources/testharnessreport.js></script> |
| 7 <script> | 7 <script> |
| 8 "use strict"; | 8 "use strict"; |
| 9 | 9 |
| 10 function testPropagationFlag(ev, expected, desc) { | 10 function testPropagationFlag(ev, expected, desc) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 testPropagationFlag(ev, false, "After stopPropagation()"); | 31 testPropagationFlag(ev, false, "After stopPropagation()"); |
| 32 ev.initEvent("foo", true, false); | 32 ev.initEvent("foo", true, false); |
| 33 testPropagationFlag(ev, true, "Reinitialized after stopPropagation()"); | 33 testPropagationFlag(ev, true, "Reinitialized after stopPropagation()"); |
| 34 | 34 |
| 35 var ev = document.createEvent("Event"); | 35 var ev = document.createEvent("Event"); |
| 36 ev.initEvent("foo", true, false); | 36 ev.initEvent("foo", true, false); |
| 37 ev.stopImmediatePropagation(); | 37 ev.stopImmediatePropagation(); |
| 38 testPropagationFlag(ev, false, "After stopImmediatePropagation()"); | 38 testPropagationFlag(ev, false, "After stopImmediatePropagation()"); |
| 39 ev.initEvent("foo", true, false); | 39 ev.initEvent("foo", true, false); |
| 40 testPropagationFlag(ev, true, "Reinitialized after stopImmediatePropagation()"); | 40 testPropagationFlag(ev, true, "Reinitialized after stopImmediatePropagation()"); |
| 41 |
| 42 var ev = document.createEvent("Event"); |
| 43 ev.initEvent("foo", true, false); |
| 44 ev.cancelBubble = true; |
| 45 testPropagationFlag(ev, false, "After cancelBubble=true"); |
| 46 ev.initEvent("foo", true, false); |
| 47 testPropagationFlag(ev, true, "Reinitialized after cancelBubble=true"); |
| 41 </script> | 48 </script> |
| OLD | NEW |