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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/v1-slots-api-1.html

Issue 1774113002: Move Shadow DOM V1 tests from fast/dom/shadow to shadow-dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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='../fast/dom/shadow/resources/shadow-dom.js'></script>
5 <div id='host'> 5 <div id='host'>
6 <template data-mode='open'> 6 <template data-mode='open'>
7 <slot name='slot1'></slot> 7 <slot name='slot1'></slot>
8 <slot name='slot2'></slot> 8 <slot name='slot2'></slot>
9 <slot name='slot3'></slot> 9 <slot name='slot3'></slot>
10 </template> 10 </template>
11 <div id='child1' slot='slot1'></div> 11 <div id='child1' slot='slot1'></div>
12 <div id='child2' slot='slot1'></div> 12 <div id='child2' slot='slot1'></div>
13 <div id='child3' slot='slot2'></div> 13 <div id='child3' slot='slot2'></div>
14 <div id='child4' slot='nonexistent'></div> 14 <div id='child4' slot='nonexistent'></div>
(...skipping 21 matching lines...) Expand all
36 assert_array_equals(slot2.getAssignedNodes(), [child3]); 36 assert_array_equals(slot2.getAssignedNodes(), [child3]);
37 assert_array_equals(slot3.getAssignedNodes(), []); 37 assert_array_equals(slot3.getAssignedNodes(), []);
38 }, "getAssignedNodes"); 38 }, "getAssignedNodes");
39 39
40 test(() => { 40 test(() => {
41 assert_array_equals(slot1.getAssignedNodes({flatten: true}), [child1, child2]) ; 41 assert_array_equals(slot1.getAssignedNodes({flatten: true}), [child1, child2]) ;
42 assert_array_equals(slot2.getAssignedNodes({flatten: true}), [child3]); 42 assert_array_equals(slot2.getAssignedNodes({flatten: true}), [child3]);
43 assert_array_equals(slot3.getAssignedNodes({flatten: true}), []); 43 assert_array_equals(slot3.getAssignedNodes({flatten: true}), []);
44 }, "getAssignedNodes({flatten: true})"); 44 }, "getAssignedNodes({flatten: true})");
45 </script> 45 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698