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

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

Issue 2466243002: Add a UA style, "display: contents", for <slot> (Closed)
Patch Set: Use html.css Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/shadow-dom/slots-fallback-in-document-tree.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5
6 <slot id='slot_in_document'></slot>
7
6 <div id="test_basic"> 8 <div id="test_basic">
7 <div id="host"> 9 <div id="host">
8 <template data-mode="open"> 10 <template data-mode="open">
9 <slot id="s1" name="slot1"></slot> 11 <slot id="s1" name="slot1"></slot>
10 </template> 12 </template>
11 <div id="c1" slot="slot1"></div> 13 <div id="c1" slot="slot1"></div>
12 </div> 14 </div>
13 </div> 15 </div>
14 16
15 <script> 17 <script>
16 test(() => { 18 test(() => {
19 assert_equals(window.getComputedStyle(slot_in_document).getPropertyValue('disp lay'),
20 'contents');
21
17 let n = createTestTree(test_basic); 22 let n = createTestTree(test_basic);
18 removeWhiteSpaceOnlyTextNodes(n.test_basic); 23 removeWhiteSpaceOnlyTextNodes(n.test_basic);
19 24
20 assert_equals(n.c1.assignedSlot, n.s1); 25 assert_equals(n.c1.assignedSlot, n.s1);
21 assert_array_equals(n.s1.assignedNodes(), [n.c1]); 26 assert_array_equals(n.s1.assignedNodes(), [n.c1]);
22 }, 'Slots: Basic.'); 27 }, 'Slots: Basic.');
23 </script> 28 </script>
24 29
25 <div id="test_basic_closed"> 30 <div id="test_basic_closed">
26 <div id="host"> 31 <div id="host">
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 502
498 n.s1.setAttribute('slot', 'slot6'); 503 n.s1.setAttribute('slot', 'slot6');
499 504
500 assert_array_equals(n.s1.assignedNodes(), [n.c1]); 505 assert_array_equals(n.s1.assignedNodes(), [n.c1]);
501 506
502 assert_array_equals(n.s5.assignedNodes(), [n.c5]); 507 assert_array_equals(n.s5.assignedNodes(), [n.c5]);
503 assert_array_equals(n.s6.assignedNodes(), [n.s1, n.s2, n.c6]); 508 assert_array_equals(n.s6.assignedNodes(), [n.s1, n.s2, n.c6]);
504 assert_array_equals(n.s6.assignedNodes({ flatten: true }), [n.c1, n.c2, n.c6]) ; 509 assert_array_equals(n.s6.assignedNodes({ flatten: true }), [n.c1, n.c2, n.c6]) ;
505 }, 'Slots: Mutation: Change slot slot= attribute.'); 510 }, 'Slots: Mutation: Change slot slot= attribute.');
506 </script> 511 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/shadow-dom/slots-fallback-in-document-tree.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698