<!DOCTYPE html>
<script src="../../resources/js-test-pre.js"></script>
<style> 
    span { font-size: 16px; }
    #control { line-height: 200%; }
    #calc-percent { line-height: calc(100% * 2); }
    #calc-percent-pixels { line-height: calc(100% + 16px); }
</style>
<div id="test-container">
    <span id="control">The line height of these lines should be identical</span><hr/>
    <span id="calc-percent">The line height of these lines should be identical</span><hr/>
    <span id="calc-percent-pixels">The line height of these lines should be identical</span><hr/>
</div>
<script>
    description("Tests that CSS3 calc() can be used for the line-height property");

    shouldEvaluateTo('getComputedStyle(document.getElementById("calc-percent"), null).lineHeight', 'getComputedStyle(document.getElementById("control"), null).lineHeight');
    shouldEvaluateTo('getComputedStyle(document.getElementById("calc-percent-pixels"), null).lineHeight', 'getComputedStyle(document.getElementById("control"), null).lineHeight');

    if (window.testRunner) {
        var testContainer = document.getElementById("test-container");
        if (testContainer)
            document.body.removeChild(testContainer);   
    }    
</script>
<script src="../../resources/js-test-post.js"></script>
