Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: LayoutTests/fast/text/computed-line-height-and-font-size-with-font-size-adjust.html

Issue 943463002: Initial implementation of font-size-adjust (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add some tests which need a rebaseline to TestExpectation Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 div.container {
5 font-size: 200px;
6 line-height: 1;
7 }
8
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");
13 }
14
15 @font-face {
16 /* OpenSans-Regular's aspect = 0.544922 */
17 font-family : 'testFont';
18 src : url('../../resources/opensans/OpenSans-Regular.woff') format("woff");
19 }
20
21 span.test {
22 font-family: testFont;
23 font-size-adjust: 0.440;
24 }
25
26 span.reference {
27 font-family: referenceFont;
28 }
29 </style>
30
31 <div class="container">
32 <span class="test">x</span><span class="reference">x</span>
33 </div>
34
35 <script>
36 description("font-size-adjust should affect neigther computed line-height no r font-size.");
37
38 var test = document.querySelector(".test");
39 var reference = document.querySelector(".reference");
40 var container = document.querySelector(".container");
41
42 var testStyle = window.getComputedStyle(test, null);
43 var referenceStyle = window.getComputedStyle(reference, null);
44 var containerStyle = window.getComputedStyle(container, null);
45
46 shouldEvaluateTo("parseFloat(testStyle.getPropertyValue('font-size-adjust')) ", 0.440, 0.0001);
47 shouldBeEqualToString("referenceStyle.getPropertyValue('font-size-adjust')", 'none');
48
49 shouldBeEqualToString("testStyle.getPropertyValue('font-size')", referenceSt yle.getPropertyValue('font-size'));
50 shouldBeEqualToString("testStyle.getPropertyValue('line-height')", reference Style.getPropertyValue('line-height'));
51
52 shouldBeEqualToString("containerStyle.getPropertyValue('line-height')", refe renceStyle.getPropertyValue('line-height'));
53 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698