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

Unified Diff: LayoutTests/fast/css/rem-units-body.html

Issue 147903002: CSS rem units should properly resolve on <body> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/rem-units-body-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/rem-units-body.html
diff --git a/LayoutTests/fast/css/rem-units-body.html b/LayoutTests/fast/css/rem-units-body.html
new file mode 100644
index 0000000000000000000000000000000000000000..a66b68084ce9d90791aaf07efbe7aebfcc5ce600
--- /dev/null
+++ b/LayoutTests/fast/css/rem-units-body.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+
+<style>
+ html {
+ font-size: 20px;
+ }
+
+ body {
+ font-size: 2rem;
+ }
+</style>
+
+<body>
+ This should be 40px tall.
+ <p id="result"></p>
+</body>
+
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ // Can't use js-test.js since it causes style recalcs which make this test not
+ // test the bug with calling styleForElement inside Document::inheritHtmlAndBodyElementStyles.
+ var result = document.getElementById("result");
+ if (getComputedStyle(document.body).fontSize === "40px")
+ result.textContent = "PASS";
+ else
+ result.textContent = "FAIL";
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/rem-units-body-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698