Chromium Code Reviews| 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> |