| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script src="resources/shadow-dom.js"></script> | 4 <script src="resources/shadow-dom.js"></script> |
| 5 <div id=host label=host> | 5 <div id=host> |
| 6 <template label=shadowRoot data-mode=open> | 6 <template id=shadowRoot data-mode=open> |
| 7 <div label=target></div> | 7 <div id=target></div> |
| 8 </template> | 8 </template> |
| 9 </div> | 9 </div> |
| 10 <script> | 10 <script> |
| 11 test(() => { | 11 test(() => { |
| 12 const e = new Event('test'); | 12 const e = new Event('test'); |
| 13 assert_equals(e.composed, false); | 13 assert_equals(e.composed, false); |
| 14 }, 'A new events composed value should be set to false by default.'); | 14 }, 'A new events composed value should be set to false by default.'); |
| 15 | 15 |
| 16 test(() => { | 16 test(() => { |
| 17 const e = new Event('test', { composed: true }); | 17 const e = new Event('test', { composed: true }); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 30 test(() => { | 30 test(() => { |
| 31 let nodes = createTestTree(host); | 31 let nodes = createTestTree(host); |
| 32 let log = dispatchEventWithLog(nodes, nodes.target, new Event('test', {bubbles
: true, composed: true})); | 32 let log = dispatchEventWithLog(nodes, nodes.target, new Event('test', {bubbles
: true, composed: true})); |
| 33 let expectedPath = ['target', 'shadowRoot', 'host']; | 33 let expectedPath = ['target', 'shadowRoot', 'host']; |
| 34 assert_event_path_equals(log, | 34 assert_event_path_equals(log, |
| 35 [['target', null, expectedPath], | 35 [['target', null, expectedPath], |
| 36 ['shadowRoot', null, expectedPath], | 36 ['shadowRoot', null, expectedPath], |
| 37 ['host', null, expectedPath]]); | 37 ['host', null, expectedPath]]); |
| 38 }, 'An event should not be scoped if composed is specified'); | 38 }, 'An event should not be scoped if composed is specified'); |
| 39 </script> | 39 </script> |
| OLD | NEW |