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

Side by Side Diff: LayoutTests/fast/css/add-remove-stylesheets-at-once-minimal-recalc-style.html

Issue 242883002: Remove MediaValues' dependency on RenderStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified minimal recalc tests to represent reduced recalc. Created 6 years, 8 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 </head> 4 </head>
5 <div id="sheet-container"></div> 5 <div id="sheet-container"></div>
6 <div><!-- Extra divs so it's clear when we're doing a full document recalc --> 6 <div><!-- Extra divs so it's clear when we're doing a full document recalc -->
7 <div></div> 7 <div></div>
8 <div></div> 8 <div></div>
9 <div></div> 9 <div></div>
10 <div></div> 10 <div></div>
(...skipping 20 matching lines...) Expand all
31 sheetContainer.innerHTML = '<style>.foo { color: green; }</style><style>.bar { c olor: red; }</style>' 31 sheetContainer.innerHTML = '<style>.foo { color: green; }</style><style>.bar { c olor: red; }</style>'
32 // 6 elements + documentElement + body get recalced. 32 // 6 elements + documentElement + body get recalced.
33 if (window.internals) 33 if (window.internals)
34 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "8"); 34 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "8");
35 35
36 document.documentElement.offsetTop; 36 document.documentElement.offsetTop;
37 sheetContainer.innerHTML = '<style>.baz { color: blue; }</style>' 37 sheetContainer.innerHTML = '<style>.baz { color: blue; }</style>'
38 38
39 // 9 elements + documentElement + body get recalced. 39 // 9 elements + documentElement + body get recalced.
40 if (window.internals) 40 if (window.internals)
41 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "11"); 41 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "10");
42 42
43 shouldBe("getComputedStyle(document.querySelector('.foo')).color", '"rgb(0, 0, 0 )"'); 43 shouldBe("getComputedStyle(document.querySelector('.foo')).color", '"rgb(0, 0, 0 )"');
44 shouldBe("getComputedStyle(document.querySelector('.baz')).color", '"rgb(0, 0, 2 55)"'); 44 shouldBe("getComputedStyle(document.querySelector('.baz')).color", '"rgb(0, 0, 2 55)"');
45 shouldBe("getComputedStyle(document.querySelector('.bar')).color", '"rgb(0, 0, 0 )"'); 45 shouldBe("getComputedStyle(document.querySelector('.bar')).color", '"rgb(0, 0, 0 )"');
46 </script> 46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698