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

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

Issue 16336010: Revert 150924 "Node::lazyAttach shouldn't lie about being attached" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/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.
25 shouldBe('internals.attached(light)', 'true'); 24 shouldBe('internals.attached(light)', 'true');
26 })(); 25 })();
27 26
28 (function testNotDistributedElementAttached() { 27 (function testNotDistributedElementAttached() {
29 var root = document.createElement('div'); 28 var root = document.createElement('div');
30 window.light = createSpanWithText('LIGHT'); 29 window.light = createSpanWithText('LIGHT');
31 root.appendChild(light); 30 root.appendChild(light);
32 31
33 var shadowRoot = root.webkitCreateShadowRoot(); 32 var shadowRoot = root.webkitCreateShadowRoot();
34 shadowRoot.appendChild(createContentWithSelect('span')); 33 shadowRoot.appendChild(createContentWithSelect('span'));
35 34
36 shouldBe('internals.attached(light)', 'false'); 35 shouldBe('internals.attached(light)', 'false');
37 document.getElementById('container').appendChild(root); 36 document.getElementById('container').appendChild(root);
38 document.body.offsetLeft; // cause a style recalc to trigger attachment.
39 shouldBe('internals.attached(light)', 'true'); 37 shouldBe('internals.attached(light)', 'true');
40 })(); 38 })();
41 39
42 var successfullyParsed = true; 40 var successfullyParsed = true;
43 </script> 41 </script>
44 <script src="../../js/resources/js-test-post.js"></script> 42 <script src="../../js/resources/js-test-post.js"></script>
45 </body> 43 </body>
46 </html> 44 </html>
OLDNEW
« no previous file with comments | « no previous file | trunk/LayoutTests/fast/html/object-image-nested-fallback.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698