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

Side by Side Diff: LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal.html

Issue 208503004: Remove prefixed Shadow DOM APIs in Element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <p>Test that stale distribution data stored in the ElementShadow is not used.</p > 3 <p>Test that stale distribution data stored in the ElementShadow is not used.</p >
4 <p>Passes if it does not crash or assert</p> 4 <p>Passes if it does not crash or assert</p>
5 5
6 <div id="host"></div> 6 <div id="host"></div>
7 7
8 <script> 8 <script>
9 if (window.testRunner) 9 if (window.testRunner)
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
11 11
12 var host = document.getElementById('host'); 12 var host = document.getElementById('host');
13 var oldestShadowRoot = host.webkitCreateShadowRoot(); 13 var oldestShadowRoot = host.createShadowRoot();
14 var youngestShadowRoot = host.webkitCreateShadowRoot(); 14 var youngestShadowRoot = host.createShadowRoot();
15 15
16 oldestShadowRoot.innerHTML = ''; 16 oldestShadowRoot.innerHTML = '';
17 youngestShadowRoot.innerHTML = '<shadow></shadow>'; 17 youngestShadowRoot.innerHTML = '<shadow></shadow>';
18 18
19 // Cause a distribution to populate the ElementShadow. 19 // Cause a distribution to populate the ElementShadow.
20 host.offsetLeft; 20 host.offsetLeft;
21 21
22 // Create a stale pointer to the HTMLShadowElement. 22 // Create a stale pointer to the HTMLShadowElement.
23 youngestShadowRoot.innerHTML = ''; 23 youngestShadowRoot.innerHTML = '';
24 24
25 // Trigger a sync attach() from innerHTML. The sync attach skips the 25 // Trigger a sync attach() from innerHTML. The sync attach skips the
26 // recalcDistribution call and would access stale data. 26 // recalcDistribution call and would access stale data.
27 oldestShadowRoot.innerHTML = '<span></span>'; 27 oldestShadowRoot.innerHTML = '<span></span>';
28 </script> 28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698