Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / invalidation / sheet-loaded-before-invalidation.html
blob0be1e82280249d5b33401c3a8deba028eaa221b1
1 <!DOCTYPE html>
2 <style>
3 body:not(.ready) #content { color: red; }
4 </style>
5 <script>
6 onload = function() {
7 var sr = document.getElementById('host').createShadowRoot();
8 var style = document.createElement('style');
9 style.innerHTML = "span { color: red; }";
11 // Finish style recalc.
12 document.body.offsetLeft;
14 // Invoke StyleInvalidator.
15 document.body.className = 'ready';
17 // Add a new stylesheet to pending stylesheets.
18 sr.appendChild(style);
20 // Finish adding all pending stylesheets via ensureUpdateRuleFeatureSet.
21 // c.f. Element::attributeChanged()
22 style.setAttribute('test', 'test');
24 </script>
25 <body>
26 <div id="target">
27 <div>
28 <div id="content">
29 Not red.
30 </div>
31 </div>
32 </div>
33 <div id="host">
34 </div>
35 </body>