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

Side by Side Diff: LayoutTests/fast/css/remove-sheet-no-layout.html

Issue 1076163002: Don't clear FontFaceCache if no @font-face were removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | LayoutTests/fast/css/remove-sheet-no-layout-expected.txt » ('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/js-test.js"></script>
3 <style id="sheet">#removed { background-color: red; }</style>
4 <style>
5 @font-face {
6 font-family: dummy;
7 src: local(dummy);
8 }
9
10 .green {
11 font-family: sans-serif;
12 background-color: green;
13 }
14 </style>
15 <div id="removed" class="green">
16 This text should have a green background.
17 </div>
18 <div>
19 <div></div>
20 <div></div>
21 <div></div>
22 <div></div>
23 </div>
24 <script>
25 description("Remove a stylesheet not affecting layout.");
26
27 var red = "rgb(255, 0, 0)";
28 var green = "rgb(0, 128, 0)";
29
30 shouldBe("getComputedStyle(removed).backgroundColor", "red");
31 document.body.offsetTop; // force layout
32
33 sheet.parentNode.removeChild(sheet);
34
35 if (window.internals) {
36 var recalcCount = internals.updateStyleAndReturnAffectedElementCount();
37 var layoutCount = internals.needsLayoutCount();
38 shouldBe("recalcCount", "1");
39 shouldBe("layoutCount", "0");
40 }
41
42 shouldBe("getComputedStyle(removed).backgroundColor", "green");
43 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/remove-sheet-no-layout-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698