[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 b72c684bb0a283f416b07c1941981fe9d4855ac1..4bdcf1e9998652c8cab9333fdc9019f9d751e060 100644 (file)
@@ -1,3 +1,34 @@
+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
similarity index 69%
rename from LayoutTests/fast/text/arabic-glyph-cache-fill-combine-expected.html
rename to LayoutTests/fast/text/international/system-language/arabic-glyph-cache-fill-combine-expected.html
index 3fcf74dd67341f6c7f0248f96768e19f759cc1d9..1092e8d96eec92c57e00247090a26cafb255fe07 100644 (file)
@@ -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>
similarity index 68%
rename from LayoutTests/fast/text/arabic-glyph-cache-fill-combine.html
rename to LayoutTests/fast/text/international/system-language/arabic-glyph-cache-fill-combine.html
index c3850657fb215b11a62ff7339f77153556a88623..aca4361333d271c18b9381808ebd1195fd1120a3 100644 (file)
@@ -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>
similarity index 89%
rename from LayoutTests/fast/text/hindi-system-font-punctuation-expected.html
rename to LayoutTests/fast/text/international/system-language/hindi-system-font-punctuation-expected.html
index 1d3aa2496b9ce76dbd52dca604db47e2e2f61a40..b53b73fffbf04fbc62144a773e57fd195e978a5b 100644 (file)
@@ -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.
similarity index 90%
rename from LayoutTests/fast/text/hindi-system-font-punctuation.html
rename to LayoutTests/fast/text/international/system-language/hindi-system-font-punctuation.html
index f4f64d10fda846d8ff378122abbbb185417d9e99..c1fd0f54a325e803e75464d5245f209bda3e6791 100644 (file)
@@ -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.
similarity index 81%
rename from LayoutTests/fast/text/system-font-punctuation.html
rename to LayoutTests/fast/text/international/system-language/system-font-punctuation.html
index 789d1964aa2e4d29bf4b5fe98c64f27ef6aea461..e8e8815136c5239764436ad424ddc6692c23ffc5 100644 (file)
@@ -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 141ea1ec828e47f9467f8dd06224f9b40069a2cd..db0dd418589e83940396d4e1592b8b6300d1bd2d 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 fabdb77768dc66ac29c496340151e7a9136c75b9..9a35573d8935bdfc84a50025ba728d1803d4af9c 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 ]
similarity index 83%
rename from LayoutTests/platform/ios-simulator/fast/text/system-font-punctuation-expected.txt
rename to LayoutTests/platform/ios-simulator/fast/text/international/system-language/system-font-punctuation-expected.txt
index 92fe3cd39ca211f4fe119d1a04146477530e5afa..5ba024d4b615592fdcd52eacb31b813507f3dbf0 100644 (file)
@@ -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 4cd440c687d7cca84bfd60edbb66093a0fe95e27..2493e0935659dc951863052c9f4727990fab075e 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 ]
similarity index 83%
rename from LayoutTests/platform/mac/fast/text/system-font-punctuation-expected.txt
rename to LayoutTests/platform/mac/fast/text/international/system-language/system-font-punctuation-expected.txt
index c4e651efc9df4e435fed984ff68d60a3bd372d49..cacb5b283b1a8ebc9e05c00009e62bf9a0dbe7e3 100644 (file)
@@ -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 6832fefed7b09617dac0dc0de11be74fded4dcdd..10d1b921f2d824d7a73d8752b512cf225d538389 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 ]