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

Side by Side Diff: LayoutTests/fast/text/font-variant-width.html

Issue 263363005: Initial patch for FontVariant, variant like HalfWidth should take Complex Path (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@emoji_android
Patch Set: Comment fix and adding Font file Created 6 years, 7 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 <html>
3 <head>
Dominik Röttsches 2014/05/27 08:54:23 No <title>, no charset.
h.joshi 2014/05/27 10:56:57 Will add both to test case.
4 <style>
5 @font-face {
6 font-family: CSSHWOrientationTest;
7 src: url(../../third_party/CSSOrientationTest/CSSHWOrientationTest.ttf) form at("truetype");
8 }
9
10 html {
11 -webkit-writing-mode: vertical-rl;
Dominik Röttsches 2014/05/27 08:54:23 Only make the relevant parts vertical, so that the
h.joshi 2014/05/27 10:56:57 Okey
12 text-rendering: geometricPrecision;
13 }
14
15 div {
Dominik Röttsches 2014/05/27 08:54:23 Why div specific CSS? This can be collapsed with a
h.joshi 2014/05/27 10:56:57 New to JS and did not knew we can do something lik
16 font-family: "CSSHWOrientationTest";
17 font-size: 24px;
18 margin: 0;
19 padding: 0;
20 }
21
22 .combine {
Dominik Röttsches 2014/05/27 08:54:23 Cleanup redundant CSS, why combine1, combine2, etc
h.joshi 2014/05/27 10:56:57 New to JS and did not knew we can do something lik
23 -webkit-text-combine: horizontal;
24 font-size: 24px;
25 line-height: 100%;
26 margin: 0;
27 padding: 0px;
28 }
29
30 .combine1 {
31 -webkit-text-combine: horizontal;
32 font-size: 24px;
33 line-height: 100%;
34 margin: 0;
35 padding: 0px;
36 }
37
38 .combine2 {
39 -webkit-text-combine: horizontal;
40 font-size: 24px;
41 line-height: 100%;
42 margin: 0;
43 padding: 0px;
44 }
45
46 </style>
47 <script src="../../resources/testharness.js"></script>
48 <script src="../../resources/testharnessreport.js"></script>
49
50 <script type="text/javascript">
51 setup({ explicit_done: true });
52 function load() {
53 var propertyHeight = document.getElementById('variantCombine').offsetHei ght;
Dominik Röttsches 2014/05/27 08:54:23 Loop over properties, instead of manually repeatin
h.joshi 2014/05/27 10:56:57 Got idea from your test case.
54 var propertyHeight1 = document.getElementById('variantCombine1').offsetH eight;
55 var propertyHeight2 = document.getElementById('variantCombine2').offsetH eight;
56
57 test(function() {
58 assert_equals(propertyHeight, 24, "Numbers laid out in one line.");
Dominik Röttsches 2014/05/27 08:54:23 Try to declare constants separately, don't use mag
h.joshi 2014/05/27 10:56:57 Okey, will follow this in future also.
59 }, "Numbers expected to be laid out in one line");
60
61 test(function() {
62 assert_equals(propertyHeight1, 24, "Number laid out in one line.");
63 }, "Number expected to be laid out in one line");
64
65 test(function() {
66 assert_equals(propertyHeight2, 24*4, "Numbers laid out in more than one line.");
Dominik Röttsches 2014/05/27 08:54:23 This test fails on Linux. Test expectation is inac
h.joshi 2014/05/27 10:56:57 It is showing "Pass" in my Linux system, let me tr
67 }, "Numbers expected to be laid out in more than one line");
68 }
69 </script>
70 </head>
71
72 <body onload="load(); done();">
Dominik Röttsches 2014/05/27 08:54:23 Rename load() to something more meaningful, put do
h.joshi 2014/05/27 10:56:57 Okey.
73 <div><span id="variantCombine" class="combine">90</span></div>
Dominik Röttsches 2014/05/27 08:54:23 Using class and id is redundant.
h.joshi 2014/05/27 10:56:57 Okey, will follow test case you shared.
74 <div><span id="variantCombine1" class="combine1">1</span></div>
75 <div><span id="variantCombine2" class="combine2">1234</span></div>
76 <div id="log"></div>
Dominik Röttsches 2014/05/27 08:54:23 Not enough test cases. Still missing cases that I
77 </body>
78 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698