[Cocoa] Add system-language-specific tests
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Sep 2015 04:10:06 +0000 (04:10 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Sep 2015 04:10:06 +0000 (04:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148775

Reviewed by Alexey Proskuryakov.

This patch adds (or rewrites) tests to take advantage of our new ability to mock
the system language for testing (https://bugs.webkit.org/show_bug.cgi?id=148671).

It tests these patches:
https://bugs.webkit.org/show_bug.cgi?id=148164
https://bugs.webkit.org/show_bug.cgi?id=147504
https://bugs.webkit.org/show_bug.cgi?id=147862
https://bugs.webkit.org/show_bug.cgi?id=147964

* fast/text/international/system-language/arabic-glyph-cache-fill-combine-expected.html: Renamed from LayoutTests/fast/text/arabic-glyph-cache-fill-combine-expected.html.
* fast/text/international/system-language/arabic-glyph-cache-fill-combine.html: Renamed from LayoutTests/fast/text/arabic-glyph-cache-fill-combine.html.
* fast/text/international/system-language/han-quotes-expected-mismatch.html: Added.
* fast/text/international/system-language/han-quotes.html: Added.
* fast/text/international/system-language/hindi-system-font-punctuation-expected.html: Renamed from LayoutTests/fast/text/hindi-system-font-punctuation-expected.html.
* fast/text/international/system-language/hindi-system-font-punctuation.html: Renamed from LayoutTests/fast/text/hindi-system-font-punctuation.html.
* fast/text/international/system-language/system-font-punctuation.html: Renamed from LayoutTests/fast/text/system-font-punctuation.html.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/fast/text/international/system-language/system-font-punctuation-expected.txt: Renamed from LayoutTests/platform/ios-simulator/fast/text/system-font-punctuation-expected.txt.
* platform/mac/TestExpectations:
* platform/mac/fast/text/international/system-language/system-font-punctuation-expected.txt: Renamed from LayoutTests/platform/mac/fast/text/system-font-punctuation-expected.txt.
* platform/win/TestExpectations:
* platform/win/fast/text/international/system-language/system-font-punctuation-expected.txt: Renamed from LayoutTests/platform/win/fast/text/system-font-punctuation-expected.txt.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189670 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/text/international/system-language/arabic-glyph-cache-fill-combine-expected.html [moved from LayoutTests/fast/text/arabic-glyph-cache-fill-combine-expected.html with 69% similarity]
LayoutTests/fast/text/international/system-language/arabic-glyph-cache-fill-combine.html [moved from LayoutTests/fast/text/arabic-glyph-cache-fill-combine.html with 68% similarity]
LayoutTests/fast/text/international/system-language/han-quotes-expected-mismatch.html [new file with mode: 0644]
LayoutTests/fast/text/international/system-language/han-quotes.html [new file with mode: 0644]
LayoutTests/fast/text/international/system-language/hindi-system-font-punctuation-expected.html [moved from LayoutTests/fast/text/hindi-system-font-punctuation-expected.html with 89% similarity]
LayoutTests/fast/text/international/system-language/hindi-system-font-punctuation.html [moved from LayoutTests/fast/text/hindi-system-font-punctuation.html with 90% similarity]
LayoutTests/fast/text/international/system-language/system-font-punctuation.html [moved from LayoutTests/fast/text/system-font-punctuation.html with 81% similarity]
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/ios-simulator/fast/text/international/system-language/system-font-punctuation-expected.txt [moved from LayoutTests/platform/ios-simulator/fast/text/system-font-punctuation-expected.txt with 83% similarity]
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/mac/fast/text/international/system-language/system-font-punctuation-expected.txt [moved from LayoutTests/platform/mac/fast/text/system-font-punctuation-expected.txt with 83% similarity]
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/win/fast/text/international/system-language/system-font-punctuation-expected.txt [moved from LayoutTests/platform/win/fast/text/system-font-punctuation-expected.txt with 100% similarity]

index b72c684..4bdcf1e 100644 (file)
@@ -1,5 +1,36 @@
 2015-09-12  Myles C. Maxfield  <mmaxfield@apple.com>
 
+        [Cocoa] Add system-language-specific tests
+        https://bugs.webkit.org/show_bug.cgi?id=148775
+
+        Reviewed by Alexey Proskuryakov.
+
+        This patch adds (or rewrites) tests to take advantage of our new ability to mock
+        the system language for testing (https://bugs.webkit.org/show_bug.cgi?id=148671).
+
+        It tests these patches:
+        https://bugs.webkit.org/show_bug.cgi?id=148164
+        https://bugs.webkit.org/show_bug.cgi?id=147504
+        https://bugs.webkit.org/show_bug.cgi?id=147862
+        https://bugs.webkit.org/show_bug.cgi?id=147964
+
+        * fast/text/international/system-language/arabic-glyph-cache-fill-combine-expected.html: Renamed from LayoutTests/fast/text/arabic-glyph-cache-fill-combine-expected.html.
+        * fast/text/international/system-language/arabic-glyph-cache-fill-combine.html: Renamed from LayoutTests/fast/text/arabic-glyph-cache-fill-combine.html.
+        * fast/text/international/system-language/han-quotes-expected-mismatch.html: Added.
+        * fast/text/international/system-language/han-quotes.html: Added.
+        * fast/text/international/system-language/hindi-system-font-punctuation-expected.html: Renamed from LayoutTests/fast/text/hindi-system-font-punctuation-expected.html.
+        * fast/text/international/system-language/hindi-system-font-punctuation.html: Renamed from LayoutTests/fast/text/hindi-system-font-punctuation.html.
+        * fast/text/international/system-language/system-font-punctuation.html: Renamed from LayoutTests/fast/text/system-font-punctuation.html.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/ios-simulator/fast/text/international/system-language/system-font-punctuation-expected.txt: Renamed from LayoutTests/platform/ios-simulator/fast/text/system-font-punctuation-expected.txt.
+        * platform/mac/TestExpectations:
+        * platform/mac/fast/text/international/system-language/system-font-punctuation-expected.txt: Renamed from LayoutTests/platform/mac/fast/text/system-font-punctuation-expected.txt.
+        * platform/win/TestExpectations:
+        * platform/win/fast/text/international/system-language/system-font-punctuation-expected.txt: Renamed from LayoutTests/platform/win/fast/text/system-font-punctuation-expected.txt.
+
+2015-09-12  Myles C. Maxfield  <mmaxfield@apple.com>
+
         [Cocoa] Allow testing with the system language
         https://bugs.webkit.org/show_bug.cgi?id=148671
 
@@ -1,10 +1,10 @@
-<!DOCTYPE>
+<!DOCTYPE html><!-- webkit-test-runner [ language=ar ] -->
 <html>
 <body>
 This test hits a codepath where codepoints were being combined before they were being input into our glyph cache.
 This character occurs just before combining marks in Unicode, and therefore was being erroneously combined. The test
 passes if the glyph is drawn in a font other than LastResort (if the test fails, the character looks like a box or like
 three horizontal lines).
-<div style="font: 50px 'Geeza Pro';">&#x64a;</div>
+<div style="font: 50px 'Geeza Pro';">&#x64a;<div style="display: inline-block; width: 1px; height: 200px;"></div></div>
 </body>
 </html>
@@ -1,10 +1,10 @@
-<!DOCTYPE>
+<!DOCTYPE html><!-- webkit-test-runner [ language=ar ] -->
 <html>
 <body>
 This test hits a codepath where codepoints were being combined before they were being input into our glyph cache.
 This character occurs just before combining marks in Unicode, and therefore was being erroneously combined. The test
 passes if the glyph is drawn in a font other than LastResort (if the test fails, the character looks like a box or like
 three horizontal lines).
-<div style="font: 50px UICTFontTextStyleBody;">&#x64a;</div>
+<div style="font: 50px UICTFontTextStyleBody;">&#x64a;<div style="display: inline-block; width: 1px; height: 200px;"></div></div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/international/system-language/han-quotes-expected-mismatch.html b/LayoutTests/fast/text/international/system-language/han-quotes-expected-mismatch.html
new file mode 100644 (file)
index 0000000..d297d3c
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<div style="font: 200px -apple-system;">&#x201c;</div>
+</body>
+</html>
diff --git a/LayoutTests/fast/text/international/system-language/han-quotes.html b/LayoutTests/fast/text/international/system-language/han-quotes.html
new file mode 100644 (file)
index 0000000..4067e25
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE html><!-- webkit-test-runner [ language=zh-Hans ] -->
+<html>
+<head>
+</head>
+<body>
+<div style="font: 200px -apple-system;">&#x201c;</div>
+</body>
+</html>
@@ -1,3 +1,4 @@
+<!DOCTYPE html><!-- webkit-test-runner [ language=hi ] -->
 <html>
 <body style="font-family: -apple-system; text-rendering: optimizeSpeed;">
 This test makes sure that punctuation next to Hindi characters are rendered as expected when the system language is set to Japanese.
@@ -1,3 +1,4 @@
+<!DOCTYPE html><!-- webkit-test-runner [ language=hi ] -->
 <html>
 <body style="font-family: -apple-system; text-rendering: optimizeSpeed;">
 This test makes sure that punctuation next to Hindi characters are rendered as expected when the system language is set to Japanese.
@@ -1,4 +1,4 @@
-<!DOCTYPE>
+<!DOCTYPE html><!-- webkit-test-runner [ language=zh-Hans ] -->
 <html>
 <body>
 This test makes sure punctuation laid out with the system font does not use vertical glyphs. The test passes if the semicolon below looks like a regular horizontal semicolon (;) and is not sideways.
index 141ea1e..db0dd41 100644 (file)
@@ -2298,7 +2298,7 @@ webkit.org/b/146887 accessibility/table-with-missing-aria-role-rows.html [ Failu
 fast/text/fallback-language-han.html [ Skip ]
 
 # This test relies on iOS-specific font fallback.
-fast/text/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
+fast/text/international/system-language/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
 
 # This test uses an MPEG-4 video
 media/video-seek-to-current-time.html [ Skip ]
index fabdb77..9a35573 100644 (file)
@@ -2602,7 +2602,7 @@ fast/text/hangul-generic-font-families.html [ WontFix ]
 fast/text/fallback-language-han.html [ Skip ]
 
 # This test relies on iOS-specific font fallback.
-fast/text/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
+fast/text/international/system-language/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
 
 # This test uses an MPEG-4 video
 media/video-seek-to-current-time.html [ Skip ]
@@ -1,8 +1,8 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
+layer at (0,0) size 800x118
+  RenderBlock {HTML} at (0,0) size 800x118
+    RenderBody {BODY} at (8,8) size 784x102
       RenderBlock (anonymous) at (0,0) size 784x40
         RenderText {#text} at (0,0) size 720x39
           text run at (0,0) width 720: "This test makes sure punctuation laid out with the system font does not use vertical glyphs. The test passes if the"
index 4cd440c..2493e09 100644 (file)
@@ -1235,7 +1235,7 @@ webkit.org/b/147763 [ Mavericks Yosemite ] accessibility/mac/loaded-notification
 webkit.org/b/147390 [ Mavericks Yosemite ElCapitan ] fast/text/fallback-language-han.html [ ImageOnlyFailure ]
 
 # This test relies on iOS-specific font fallback.
-[ Mavericks Yosemite ElCapitan ] fast/text/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
+[ Mavericks Yosemite ElCapitan ] fast/text/international/system-language/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
 
 # Started to fail after r188390
 webkit.org/b/148042 http/tests/media/video-buffered-range-contains-currentTime.html [ Pass Failure ]
@@ -1287,3 +1287,5 @@ webkit.org/b/143258 [ Mavericks ] http/tests/cache/disk-cache/disk-cache-validat
 
 # Mocking the system language relies on Bootstrap XPC messages, which are not supported in Mavericks.
 [ Mavericks ] fast/text/international/system-language [ Failure ]
+# Han quotes are not different on Mavericks nor Yosemite.
+[ Mavericks Yosemite ] fast/text/international/system-language/han-quotes.html [ ImageOnlyFailure ]
@@ -1,8 +1,8 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
+layer at (0,0) size 800x111
+  RenderBlock {HTML} at (0,0) size 800x111
+    RenderBody {BODY} at (8,8) size 784x95
       RenderBlock (anonymous) at (0,0) size 784x36
         RenderText {#text} at (0,0) size 720x36
           text run at (0,0) width 720: "This test makes sure punctuation laid out with the system font does not use vertical glyphs. The test passes if the"
index 6832fef..10d1b92 100644 (file)
@@ -3176,7 +3176,7 @@ fast/inline/padding-ellipsis-right.html [ ImageOnlyFailure ]
 fast/text/fallback-language-han.html [ Skip ]
 
 # This test relies on iOS-specific font fallback.
-fast/text/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
+fast/text/international/system-language/arabic-glyph-cache-fill-combine.html [ ImageOnlyFailure ]
 
 fast/ruby/ruby-expansion-cjk.html [ ImageOnlyFailure ]
 fast/ruby/ruby-expansion-cjk-2.html [ ImageOnlyFailure ]