|
25 | 25 | let n = createTestTree(test1);
|
26 | 26 | let log = dispatchEventWithLog(n, n.target, new FocusEvent('my-focus', { bubbles: true, composed: true, relatedTarget: n.target }));
|
27 | 27 | let path = ['target', 'test1'];
|
28 |
| - assert_event_path_equals(log, [['target', 'target', 'target', path], |
29 |
| - ['test1', 'target', 'target', path]]); |
30 |
| -}, 'Event path for an event with a relatedTarget. Event should be dispatched even when target and relatedTarget are same.'); |
| 28 | + assert_array_equals(log, []); |
| 29 | +}, 'Event path for an event with a relatedTarget. Event should not be dispatched when target and relatedTarget are same.'); |
31 | 30 | </script>
|
32 | 31 |
|
33 | 32 | <div id="test2">
|
|
52 | 51 | let n = createTestTree(test2);
|
53 | 52 | let log = dispatchEventWithLog(n, n.target, new FocusEvent('my-focus', { bubbles: true, composed: true, relatedTarget: n.target }));
|
54 | 53 | let path = ['target', 'sr'];
|
55 |
| - assert_event_path_equals(log, [['target', 'target', 'target', path], |
56 |
| - ['sr', 'target', 'target', path]]); |
57 |
| -}, 'Event path for an event with a relatedTarget which is identical to target. Event should be dispatched and should stop at the shadow root.'); |
| 54 | + assert_array_equals(log, []); |
| 55 | +}, 'Event path for an event with a relatedTarget which is identical to target. Event should not be dispatched.'); |
58 | 56 | </script>
|
59 | 57 |
|
60 | 58 | <div id="test3_1">
|
|
137 | 135 | let n = createTestTree(test4);
|
138 | 136 | let log = dispatchEventWithLog(n, n.host1, new FocusEvent('my-focus', { bubbles: true, composed: true, relatedTarget: n.target }));
|
139 | 137 | let path = ['host1', 'test4'];
|
140 |
| - assert_event_path_equals(log, [['host1', 'host1', 'host1', path], |
141 |
| - ['test4', 'host1', 'host1', path]]); |
| 138 | + assert_event_path_equals(log, []); |
142 | 139 | }, 'Event path for an event with a relatedTarget. target is a shadow-including ancestor of relatedTarget.');
|
143 | 140 | </script>
|
144 | 141 |
|
|
0 commit comments