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

Side by Side Diff: LayoutTests/fast/dom/shadow/shadow-root-attached.html

Issue 15159008: Node::lazyAttach shouldn't lie about being attached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase again Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/html/object-image-nested-fallback.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 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script src="../resources/shadow-test-driver.js"></script> 5 <script src="../resources/shadow-test-driver.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p>This test checks nodes are reallyed attached.</p> 8 <p>This test checks nodes are reallyed attached.</p>
9 <pre id="console"></pre> 9 <pre id="console"></pre>
10 <div id="container"></div> 10 <div id="container"></div>
11 11
12 <script> 12 <script>
13 var container = document.getElementById("container"); 13 var container = document.getElementById("container");
14 14
15 (function testAttachedInLightChildren() { 15 (function testAttachedInLightChildren() {
16 var root = document.createElement('div'); 16 var root = document.createElement('div');
17 window.light = createSpanWithText('LIGHT'); 17 window.light = createSpanWithText('LIGHT');
18 root.appendChild(light); 18 root.appendChild(light);
19 19
20 var shadowRoot = root.webkitCreateShadowRoot(); 20 var shadowRoot = root.webkitCreateShadowRoot();
21 21
22 shouldBe('internals.attached(light)', 'false'); 22 shouldBe('internals.attached(light)', 'false');
23 document.getElementById('container').appendChild(root); 23 document.getElementById('container').appendChild(root);
24 document.body.offsetLeft; // cause a style recalc to trigger attachment.
24 shouldBe('internals.attached(light)', 'true'); 25 shouldBe('internals.attached(light)', 'true');
25 })(); 26 })();
26 27
27 (function testNotDistributedElementAttached() { 28 (function testNotDistributedElementAttached() {
28 var root = document.createElement('div'); 29 var root = document.createElement('div');
29 window.light = createSpanWithText('LIGHT'); 30 window.light = createSpanWithText('LIGHT');
30 root.appendChild(light); 31 root.appendChild(light);
31 32
32 var shadowRoot = root.webkitCreateShadowRoot(); 33 var shadowRoot = root.webkitCreateShadowRoot();
33 shadowRoot.appendChild(createContentWithSelect('span')); 34 shadowRoot.appendChild(createContentWithSelect('span'));
34 35
35 shouldBe('internals.attached(light)', 'false'); 36 shouldBe('internals.attached(light)', 'false');
36 document.getElementById('container').appendChild(root); 37 document.getElementById('container').appendChild(root);
38 document.body.offsetLeft; // cause a style recalc to trigger attachment.
37 shouldBe('internals.attached(light)', 'true'); 39 shouldBe('internals.attached(light)', 'true');
38 })(); 40 })();
39 41
40 var successfullyParsed = true; 42 var successfullyParsed = true;
41 </script> 43 </script>
42 <script src="../../js/resources/js-test-post.js"></script> 44 <script src="../../js/resources/js-test-post.js"></script>
43 </body> 45 </body>
44 </html> 46 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/html/object-image-nested-fallback.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698