Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/shadow-dom/slotchange.html |
| diff --git a/third_party/WebKit/LayoutTests/shadow-dom/slotchange.html b/third_party/WebKit/LayoutTests/shadow-dom/slotchange.html |
| index 6dcd9a9a184162ab4e9cda8152d50e52eb73de3d..5b9235de82a88549aafa41c1fcd0d783b432e61b 100644 |
| --- a/third_party/WebKit/LayoutTests/shadow-dom/slotchange.html |
| +++ b/third_party/WebKit/LayoutTests/shadow-dom/slotchange.html |
| @@ -5,7 +5,7 @@ |
| <div id="test1"> |
| <div id="host1"> |
| - <template data-mode="open"> |
| + <template id="shadowroot" data-mode="open"> |
| <slot id="s1" name="slot1"></slot> |
| </template> |
| <div id="c1" slot="slot1"></div> |
| @@ -30,6 +30,22 @@ async_test((test) => { |
| let n = createTestTree(test1); |
| removeWhiteSpaceOnlyTextNodes(n.test1); |
| + n.shadowroot.addEventListener('slotchange', test.step_func((e) => { |
|
kochi
2016/09/02 02:57:06
nit: you can use test.step_func_done(...) and remo
hayato
2016/09/02 04:08:10
Done.
|
| + assert_true(event.bubbles, 'A slotchange should be a bubble event'); |
| + assert_false(event.composed, 'A slotchange should be a non-composed event') |
| + assert_equals(event.target, n.s1); |
| + test.done(); |
| + })) |
| + |
| + let d1 = document.createElement('div'); |
| + d1.setAttribute('slot', 'slot1'); |
| + n.host1.appendChild(d1); |
| +}, 'A slotchange event shoud be a bubble, non-composed event.'); |
|
kochi
2016/09/02 02:57:06
nit: s/bubble/bubbling/
hayato
2016/09/02 04:08:10
Done
|
| + |
| +async_test((test) => { |
| + let n = createTestTree(test1); |
| + removeWhiteSpaceOnlyTextNodes(n.test1); |
| + |
| doneIfSlotChange([n.s1], test); |
| let d1 = document.createElement('div'); |