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

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 old test Created 4 years, 4 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
sashab 2016/08/25 23:25:12 Remove blank line
sashab 2016/08/25 23:25:13 Remove blank line
rune 2016/08/26 07:15:34 Done.
11 document.body.offsetTop;
12
13 test.step(() => {
14 assert_true(!!window.internals, "Test requires internals object for recalc count.");
15 });
16
17 test.step(() => {
18 document.querySelector("#media-sheet").href = "data:text/css,#x{colo r:pink}";
19 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 0, "No style recalc adding sheet without matching rules.");
20 });
21
22 test.step(() => {
23 document.querySelector("#alternate-sheet").href = "data:text/css,*{c olor:pink}";
24 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 0, "No style recalc adding alternate sheet.");
25 });
26
27 test.done();
28 };
29 </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