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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/text/font-variant-width-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/text/font-variant-width.html
diff --git a/LayoutTests/fast/text/font-variant-width.html b/LayoutTests/fast/text/font-variant-width.html
new file mode 100644
index 0000000000000000000000000000000000000000..a678283b5ab1e88907353ad3f1167b043bedabd3
--- /dev/null
+++ b/LayoutTests/fast/text/font-variant-width.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
+<title>Font Width Variant Text Combine</title>
+<style>
+@font-face {
+ font-family: CSSHWOrientationTest;
+ src: url(../../third_party/CSSOrientationTest/CSSHWOrientationTest.ttf) format("truetype");
+}
+
+.vertical {
+ font-family: "CSSHWOrientationTest";
+ font-size: 24px;
+ text-rendering: geometricPrecision;
+ -webkit-writing-mode: vertical-lr;
+ line-height: 100%;
+ margin: 0;
+ padding: 0px;
+}
+
+.combine {
+ -webkit-text-combine: horizontal;
+}
+
+</style>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
+
+ <script type="text/javascript">
+ setup({ explicit_done: true });
+ function testWidthVariant() {
+ var EXPECTED_COMBINED_UNTIL = 4;
+ var EXPECTED_LINE_HEIGHT = 24;
+ var NUM_TESTS = 9;
+ for (var testId = 0; testId < NUM_TESTS; testId++) {
+ rectHeight = document.getElementsByClassName("combine")[testId].getBoundingClientRect().height;
+ if (testId < EXPECTED_COMBINED_UNTIL) {
+ test(function() {
+ assert_equals(rectHeight, EXPECTED_LINE_HEIGHT, "Numbers laid out in one combining block.");
+ }, "Numbers expected to be laid out in one combining block");
+ } else {
+ test(function() {
+ assert_true(rectHeight > EXPECTED_LINE_HEIGHT, EXPECTED_LINE_HEIGHT, "Number laid out vertically, not combined.");
+ }, "Number laid out vertically, not combined.");
+ }
+ }
+ done();
+ }
+ </script>
+</head>
+
+<body onload="testWidthVariant();">
+ <div class="vertical">
+ <!-- horizontally combined -->
+ <div><span class="combine">1</span></div>
+ <div><span class="combine">9</span></div>
+ <div><span class="combine">11</span></div>
+ <div><span class="combine">99</span></div>
+ <!-- vertical -->
+ <div><span class="combine">111</span></div>
+ <div><span class="combine">999</span></div>
+ <div><span class="combine">1234</span></div>
+ <div><span class="combine">1111</span></div>
+ <div><span class="combine">9999</span></div>
+ </div>
+ <div id="log"></div>
+</body>
+</html>
+
« 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