Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/slotchange-slotname-renamed.html

Issue 2012423004: Rename Event.scoped to Event.composed and invert its meaning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@event-composed-path
Patch Set: rebased Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <!-- This is a micro benchmark to catch an unintentional regression. 5 <!-- This is a micro benchmark to catch an unintentional regression.
6 If the reason of a regression is clear, it is okay. 6 If the reason of a regression is clear, it is okay.
7 We do not have to optimize the result of the benchmark. --> 7 We do not have to optimize the result of the benchmark. -->
8 <div id='d1'> 8 <div id='d1'>
9 <template data-mode='open' data-expose-as='d1_shadow'> 9 <template data-mode='open' data-expose-as='d1_shadow'>
10 <slot name='d1-s1'></slot> 10 <slot name='d1-s1'></slot>
(...skipping 10 matching lines...) Expand all
21 const d1_s1 = d1_shadow.querySelector('slot'); 21 const d1_s1 = d1_shadow.querySelector('slot');
22 22
23 assert_array_equals(d1_s1.assignedNodes(), [d2]); 23 assert_array_equals(d1_s1.assignedNodes(), [d2]);
24 assert_array_equals(d1_s1.assignedNodes({'flatten': true}), [d2]); 24 assert_array_equals(d1_s1.assignedNodes({'flatten': true}), [d2]);
25 25
26 d1_s1.addEventListener('slotchange', (e) => { 26 d1_s1.addEventListener('slotchange', (e) => {
27 test.step(() => { 27 test.step(() => {
28 assert_equals(e.target, d1_s1); 28 assert_equals(e.target, d1_s1);
29 assert_array_equals(d1_s1.assignedNodes(), []); 29 assert_array_equals(d1_s1.assignedNodes(), []);
30 assert_array_equals(d1_s1.assignedNodes({'flatten': true}), []); 30 assert_array_equals(d1_s1.assignedNodes({'flatten': true}), []);
31 assert_equals(e.scoped, true);
32 test.done(); 31 test.done();
33 }); 32 });
34 }); 33 });
35 34
36 d2.setAttribute('slot', 'non-exist'); 35 d2.setAttribute('slot', 'non-exist');
37 }, "slotchange event caused by renaming slot name"); 36 }, "slotchange event caused by renaming slot name");
38 </script> 37 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698