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

Unified Diff: LayoutTests/fast/text/fontWidthVariant.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: Adding test case based on testharness.js 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/resources/CSSHWOrientationTest.ttf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/text/fontWidthVariant.html
diff --git a/LayoutTests/fast/text/fontWidthVariant.html b/LayoutTests/fast/text/fontWidthVariant.html
new file mode 100644
index 0000000000000000000000000000000000000000..ee40eac53f40dd5875797219a11b16b5e98c1846
--- /dev/null
+++ b/LayoutTests/fast/text/fontWidthVariant.html
@@ -0,0 +1,64 @@
+<!DOCTYPE HTML>
Dominik Röttsches 2014/05/13 08:45:34 Please change the file name to be consistent with
+<meta charset="utf-8">
+<html>
+ <head>
+ <style type="text/css" id="styleElement">
+ </style>
+ <style>
+@font-face {
+ font-family: CSSHWOrientationTest;
+ src: url(../../resources/CSSHWOrientationTest.ttf) format("truetype");
Dominik Röttsches 2014/05/13 08:45:34 Please take a look at LayoutTests/third_party/Libe
+}
+
+html {
+ -webkit-writing-mode: vertical-rl;
+ text-rendering: geometricPrecision;
+}
+
+p {
+ font-family: "CSSHWOrientationTest", sans;
+ font-size: 24px;
+}
+
+.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 updateQuery() {
Dominik Röttsches 2014/05/13 08:45:34 Why "updateQuery()?" - Please think about better n
+ var styleElement = document.getElementById("styleElement");
+ var spanElement = document.getElementById("variantCombine");
+
+ var theCSSprop_1 = spanElement.offsetHeight;
Dominik Röttsches 2014/05/13 08:45:34 Please clean up code before uploading to make it e
+ //alert(theCSSprop_1);
+
+ // Apply class having webkit-text-combine property
+ document.getElementById('variantCombine').className = 'combine';
+
+ var theCSSprop_2 = spanElement.offsetHeight;
+ //alert(theCSSprop_2);
+
+ test(function() {
+ assert_true(theCSSprop_2 < theCSSprop_1,
+ "New query doesn't match, property not applied.")
Dominik Röttsches 2014/05/13 08:45:34 Needs a better assert failure description. The pro
+ },
+ "Testing that webkit-text-combine is appplied");
+
+ // reset class
+ spanElement.className = "";
+ }
+ </script>
+</head>
+
+<body onload="updateQuery(); done();">
+ <span>This test verifies that webkit-text-combin is applied.</span>
Dominik Röttsches 2014/05/13 08:45:34 Please spell the CSS property correctly, including
+ <div id="log"></div>
+ <p>
+ 文字<span id="variantCombine">90</span>年
Dominik Röttsches 2014/05/13 08:45:34 Do we need the filler text before and after the "9
+ </p>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/resources/CSSHWOrientationTest.ttf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698