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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/get-destination-insertion-points-re-distribution.html

Issue 2051373002: Rewrite and organize tests in LayoutTests/shadow-dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean-test2-3
Patch Set: clean up 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/js-test.js"></script>
3 <script src="../fast/dom/shadow/resources/shadow-dom.js"></script>
4 <body></body>
5 <script>
6 description("Tests for getDestinationInsertionPoints() which involves re-distrib ution.");
7
8 document.body.appendChild(
9 createDOM('div', {},
10 createDOM('div', {'id': 'host-1'},
11 createShadowRoot(
12 createDOM('div', {'id': 'host-2'},
13 createShadowRoot(
14 createDOM('content', {'id': 'content-2 '})),
15 createDOM('content', {'id': 'content-1'})) ),
16 createDOM('div', {'id': 'child-1'}))));
17
18 shouldBeEqualAsArray(document.getElementById('child-1').getDestinationInsertionP oints(),
19 [getNodeInComposedTree('host-1/content-1'), getNodeInCompos edTree('host-1/host-2/content-2')]);
20
21 document.body.appendChild(
22 createDOM('div', {},
23 createDOM('div', {'id': 'host-10'},
24 createShadowRoot(
25 createDOM('div', {'id': 'host-20'},
26 attachShadow(
27 {'mode': 'open'},
28 createDOM('content', {'id': 'content-2 0'})),
29 createDOM('content', {'id': 'content-10'}) )),
30 createDOM('div', {'id': 'child-10'}))));
31
32 shouldBeEqualAsArray(document.getElementById('child-10').getDestinationInsertion Points(),
33 [getNodeInComposedTree('host-10/content-10')]);
34
35 document.body.appendChild(
36 createDOM('div', {},
37 createDOM('div', {'id': 'host-11'},
38 createShadowRoot(
39 createDOM('div', {'id': 'host-21'},
40 attachShadow(
41 {'mode': 'closed'},
42 createDOM('content', {'id': 'content-2 1'})),
43 createDOM('content', {'id': 'content-11'}) )),
44 createDOM('div', {'id': 'child-11'}))));
45
46 shouldBeEqualAsArray(document.getElementById('child-11').getDestinationInsertion Points(),
47 [getNodeInComposedTree('host-11/content-11')]);
48
49 document.body.appendChild(
50 createDOM('div', {},
51 createDOM('div', {'id': 'host-12'},
52 attachShadow(
53 {'mode': 'closed'},
54 createDOM('div', {'id': 'host-22'},
55 createShadowRoot(
56 createDOM('content', {'id': 'content-2 2'})),
57 createDOM('content', {'id': 'content-12'}) )),
58 createDOM('div', {'id': 'child-12'}))));
59
60 shouldBe('document.getElementById("child-12").getDestinationInsertionPoints().le ngth', '0');
61 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698