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

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: Updating Test Expectation Created 6 years, 4 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/text/font-variant-width-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
5 <title>Font Width Variant Text Combine</title>
6 <style>
7 @font-face {
8 font-family: CSSHWOrientationTest;
9 src: url(../../third_party/CSSOrientationTest/CSSHWOrientationTest.ttf) form at("truetype");
10 }
11
12 .vertical {
13 font-family: "CSSHWOrientationTest";
14 font-size: 24px;
15 text-rendering: geometricPrecision;
16 -webkit-writing-mode: vertical-lr;
17 line-height: 100%;
18 margin: 0;
19 padding: 0px;
20 }
21
22 .combine {
23 -webkit-text-combine: horizontal;
24 }
25
26 </style>
27 <script src="../../resources/testharness.js"></script>
28 <script src="../../resources/testharnessreport.js"></script>
29
30 <script type="text/javascript">
31 setup({ explicit_done: true });
32 function testWidthVariant() {
33 var EXPECTED_COMBINED_UNTIL = 4;
34 var EXPECTED_LINE_HEIGHT = 24;
35 var NUM_TESTS = 9;
36 for (var testId = 0; testId < NUM_TESTS; testId++) {
37 rectHeight = document.getElementsByClassName("combine")[testId].getB oundingClientRect().height;
38 if (testId < EXPECTED_COMBINED_UNTIL) {
39 test(function() {
40 assert_equals(rectHeight, EXPECTED_LINE_HEIGHT, "Numbers lai d out in one combining block.");
41 }, "Numbers expected to be laid out in one combining block");
42 } else {
43 test(function() {
44 assert_true(rectHeight > EXPECTED_LINE_HEIGHT, EXPECTED_LINE _HEIGHT, "Number laid out vertically, not combined.");
45 }, "Number laid out vertically, not combined.");
46 }
47 }
48 done();
49 }
50 </script>
51 </head>
52
53 <body onload="testWidthVariant();">
54 <div class="vertical">
55 <!-- horizontally combined -->
56 <div><span class="combine">1</span></div>
57 <div><span class="combine">9</span></div>
58 <div><span class="combine">11</span></div>
59 <div><span class="combine">99</span></div>
60 <!-- vertical -->
61 <div><span class="combine">111</span></div>
62 <div><span class="combine">999</span></div>
63 <div><span class="combine">1234</span></div>
64 <div><span class="combine">1111</span></div>
65 <div><span class="combine">9999</span></div>
66 </div>
67 <div id="log"></div>
68 </body>
69 </html>
70
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/text/font-variant-width-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698