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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/add-non-blocking-sheet-recalc.html

Issue 2278803002: Use AnalyzedStyleUpdate for non-blocking sheets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed blank line. Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/link-alternate-style-recalc.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <link id="media-sheet" rel="stylesheet" media="(min-width: 5000px)">
5 <link id="alternate-sheet" rel="alternate stylesheet" title="alternate">
6 <script>
7 var test = async_test("Check that adding a non-blocking stylesheet does not cause a full document recalc.");
8
9 window.onload = () => {
10 document.body.offsetTop;
11
12 test.step(() => {
13 assert_true(!!window.internals, "Test requires internals object for recalc count.");
14 });
15
16 test.step(() => {
17 document.querySelector("#media-sheet").href = "data:text/css,#x{colo r:pink}";
18 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 0, "No style recalc adding sheet without matching rules.");
19 });
20
21 test.step(() => {
22 document.querySelector("#alternate-sheet").href = "data:text/css,*{c olor:pink}";
23 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 0, "No style recalc adding alternate sheet.");
24 });
25
26 test.done();
27 };
28 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/link-alternate-style-recalc.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698