blob: a66b68084ce9d90791aaf07efbe7aebfcc5ce600 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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>
|