29 lines
1.1 KiB
HTML
29 lines
1.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<style>
|
|
#control {font-size: 200%;}
|
|
#calc-percent {font-size: calc(200%);}
|
|
#calc-percent-pixels {font-size: calc(150% + 10px);}
|
|
</style>
|
|
|
|
<div id="test-container" style="font-size: 20px;">
|
|
<span id="control">The font size of these lines should be identical</span>
|
|
<br/>
|
|
<span class="fonttest" id="calc-percent">The font size of these lines should be identical</span>
|
|
<br/>
|
|
<span class="fonttest" id="calc-percent-pixels">The font size of these lines should be identical</span>
|
|
</div>
|
|
|
|
<script>
|
|
description("Tests that CSS3 calc() can be used with the font-size property");
|
|
|
|
var spans = document.getElementsByClassName("fonttest");
|
|
for (var i = 0; i < spans.length; ++i) {
|
|
shouldBeEqualToString('getComputedStyle(document.getElementById("' + spans[i].id + '"), null).fontSize', getComputedStyle(document.getElementById("control"), null).fontSize);
|
|
}
|
|
|
|
if (window.testRunner)
|
|
document.body.removeChild(document.getElementById("test-container"));
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|