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..ae4d1ffbb5019a6a653fabfbbe4c63dc59b95cea |
--- /dev/null |
+++ b/LayoutTests/fast/text/font-variant-width.html |
@@ -0,0 +1,78 @@ |
+<!DOCTYPE html> |
+<html> |
+<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.
|
+<style> |
+@font-face { |
+ font-family: CSSHWOrientationTest; |
+ src: url(../../third_party/CSSOrientationTest/CSSHWOrientationTest.ttf) format("truetype"); |
+} |
+ |
+html { |
+ -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
|
+ text-rendering: geometricPrecision; |
+} |
+ |
+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
|
+ font-family: "CSSHWOrientationTest"; |
+ font-size: 24px; |
+ margin: 0; |
+ padding: 0; |
+} |
+ |
+.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
|
+ -webkit-text-combine: horizontal; |
+ font-size: 24px; |
+ line-height: 100%; |
+ margin: 0; |
+ padding: 0px; |
+} |
+ |
+.combine1 { |
+ -webkit-text-combine: horizontal; |
+ font-size: 24px; |
+ line-height: 100%; |
+ margin: 0; |
+ padding: 0px; |
+} |
+ |
+.combine2 { |
+ -webkit-text-combine: horizontal; |
+ font-size: 24px; |
+ line-height: 100%; |
+ margin: 0; |
+ padding: 0px; |
+} |
+ |
+</style> |
+ <script src="../../resources/testharness.js"></script> |
+ <script src="../../resources/testharnessreport.js"></script> |
+ |
+ <script type="text/javascript"> |
+ setup({ explicit_done: true }); |
+ function load() { |
+ var propertyHeight = document.getElementById('variantCombine').offsetHeight; |
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.
|
+ var propertyHeight1 = document.getElementById('variantCombine1').offsetHeight; |
+ var propertyHeight2 = document.getElementById('variantCombine2').offsetHeight; |
+ |
+ test(function() { |
+ 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.
|
+ }, "Numbers expected to be laid out in one line"); |
+ |
+ test(function() { |
+ assert_equals(propertyHeight1, 24, "Number laid out in one line."); |
+ }, "Number expected to be laid out in one line"); |
+ |
+ test(function() { |
+ 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
|
+ }, "Numbers expected to be laid out in more than one line"); |
+ } |
+ </script> |
+</head> |
+ |
+<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.
|
+ <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.
|
+ <div><span id="variantCombine1" class="combine1">1</span></div> |
+ <div><span id="variantCombine2" class="combine2">1234</span></div> |
+ <div id="log"></div> |
Dominik Röttsches
2014/05/27 08:54:23
Not enough test cases. Still missing cases that I
|
+</body> |
+</html> |