Chromium Code Reviews| Index: LayoutTests/fast/text/computed-line-height-and-font-size-with-font-size-adjust.html |
| diff --git a/LayoutTests/fast/text/computed-line-height-and-font-size-with-font-size-adjust.html b/LayoutTests/fast/text/computed-line-height-and-font-size-with-font-size-adjust.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3e5b2ec8a51af4cc4be26d44ee3062fb59b9fea4 |
| --- /dev/null |
| +++ b/LayoutTests/fast/text/computed-line-height-and-font-size-with-font-size-adjust.html |
| @@ -0,0 +1,64 @@ |
| +<html> |
|
rune
2015/03/02 09:08:36
- Use <!DOCTYPE html>
- No html, head, or body tag
changseok
2015/03/02 15:57:48
Done.
|
| + <head> |
| + <script src="../../resources/js-test.js"></script> |
| + <style> |
| + div.container { |
| + font-size: 200px; |
| + line-height: 1; |
| + } |
| + |
| + @font-face { |
| + /* LinLibertine_R's aspect value = 0.440918 */ |
| + font-family : 'referenceFont'; |
| + src : url('../../third_party/Libertine/LinLibertine_R.woff') format("woff"); |
| + } |
| + |
| + @font-face { |
| + /* OpenSans-Regular's aspect = 0.544922 */ |
| + font-family : 'testFont'; |
| + src : url('../../resources/opensans/OpenSans-Regular.woff') format("woff"); |
| + } |
| + |
| + span.test { |
| + font-family: testFont; |
| + font-size-adjust: 0.440; |
| + } |
| + |
| + span.reference { |
| + font-family: referenceFont; |
| + } |
| + </style> |
| + <script> |
| + var testStyle; |
| + var referenceStyle; |
| + var containerStyle; |
| + |
| + function runTest() |
| + { |
| + description("font-size-adjust should affect neigther computed line-height nor font-size."); |
| + |
| + var test = document.querySelector(".test"); |
| + var reference = document.querySelector(".reference"); |
| + var container = document.querySelector(".container"); |
| + |
| + testStyle = window.getComputedStyle(test, null); |
| + referenceStyle = window.getComputedStyle(reference, null); |
| + containerStyle = window.getComputedStyle(container, null); |
| + |
| + shouldEvaluateTo("parseFloat(testStyle.getPropertyValue('font-size-adjust'))", 0.440, 0.0001); |
| + shouldBeEqualToString("referenceStyle.getPropertyValue('font-size-adjust')", 'none'); |
| + |
| + shouldBeEqualToString("testStyle.getPropertyValue('font-size')", referenceStyle.getPropertyValue('font-size')); |
| + shouldBeEqualToString("testStyle.getPropertyValue('line-height')", referenceStyle.getPropertyValue('line-height')); |
| + |
| + shouldBeEqualToString("containerStyle.getPropertyValue('line-height')", referenceStyle.getPropertyValue('line-height')); |
| + } |
| + </script> |
| + </head> |
| + |
| + <body onload="runTest()"> |
| + <div class="container"> |
| + <span class="test">x</span><span class="reference">x</span> |
| + </div> |
| + </body> |
| +</html> |