Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / computed-line-height-and-font-size-with-font-size-adjust.html
blobcdefa784c94098c1752e514d45c894a4184d1a3f
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 div.container {
5 font-size: 200px;
6 line-height: 1;
9 @font-face {
10 /* LinLibertine_R's aspect value = 0.440918 */
11 font-family : 'referenceFont';
12 src : url('../../third_party/Libertine/LinLibertine_R.woff') format("woff");
15 @font-face {
16 /* OpenSans-Regular's aspect = 0.544922 */
17 font-family : 'testFont';
18 src : url('../../resources/opensans/OpenSans-Regular.woff') format("woff");
21 span.test {
22 font-family: testFont;
23 font-size-adjust: 0.440;
26 span.reference {
27 font-family: referenceFont;
29 </style>
31 <div class="container">
32 <span class="test">x</span><span class="reference">x</span>
33 </div>
35 <script>
36 description("font-size-adjust should affect neigther computed line-height nor font-size.");
38 var test = document.querySelector(".test");
39 var reference = document.querySelector(".reference");
40 var container = document.querySelector(".container");
42 var testStyle = window.getComputedStyle(test, null);
43 var referenceStyle = window.getComputedStyle(reference, null);
44 var containerStyle = window.getComputedStyle(container, null);
46 shouldEvaluateTo("parseFloat(testStyle.getPropertyValue('font-size-adjust'))", 0.440, 0.0001);
47 shouldBeEqualToString("referenceStyle.getPropertyValue('font-size-adjust')", 'none');
49 shouldBeEqualToString("testStyle.getPropertyValue('font-size')", referenceStyle.getPropertyValue('font-size'));
50 shouldBeEqualToString("testStyle.getPropertyValue('line-height')", referenceStyle.getPropertyValue('line-height'));
52 shouldBeEqualToString("containerStyle.getPropertyValue('line-height')", referenceStyle.getPropertyValue('line-height'));
53 </script>