Update WebKit1.StringTruncator for Mountain Lion.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Mar 2014 05:57:40 +0000 (05:57 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Mar 2014 05:57:40 +0000 (05:57 +0000)
* TestWebKitAPI/Tests/mac/StringTruncator.mm: Looks like one subtest was failing
due to different font metrics on 10.8.

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

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/mac/StringTruncator.mm

index 3913eb903d54dfcef4dffda08e894f0f57c628c9..5f00e1107f87b78e70564aa8577e884816eb9aea 100644 (file)
@@ -1,3 +1,10 @@
+2014-03-29  Alexey Proskuryakov  <ap@apple.com>
+
+        Update WebKit1.StringTruncator for Mountain Lion.
+
+        * TestWebKitAPI/Tests/mac/StringTruncator.mm: Looks like one subtest was failing
+        due to different font metrics on 10.8.
+
 2014-03-28  Darin Adler  <darin@apple.com>
 
         Fix recently-introduced off-by-one error in centerTruncateToBuffer
index 252eb054ef76d269f645282b0175492e9c3b9d0d..5f41ccd884cfe21705a531f96961486fa42ac20d 100644 (file)
@@ -33,7 +33,11 @@ namespace TestWebKitAPI {
 TEST(WebKit1, StringTruncator)
 {
     @autoreleasepool {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
         EXPECT_STREQ([[WebStringTruncator centerTruncateString:@"abcdefghijklmnopqrstuvwxyz" toWidth:100 withFont:[NSFont fontWithName:@"Helvetica" size:12]] UTF8String], "abcdef…tuvwxyz");
+#else
+        EXPECT_STREQ([[WebStringTruncator centerTruncateString:@"abcdefghijklmnopqrstuvwxyz" toWidth:100 withFont:[NSFont fontWithName:@"Helvetica" size:12]] UTF8String], "abcdefg…tuvwxyz");
+#endif
         EXPECT_STREQ([[WebStringTruncator centerTruncateString:@"abcdefghijklmnopqrstuvwxyz" toWidth:100] UTF8String], "abcde…uvwxyz");
         EXPECT_STREQ([[WebStringTruncator rightTruncateString:@"abcdefghijklmnopqrstuvwxyz" toWidth:100 withFont:[NSFont fontWithName:@"Helvetica" size:12]] UTF8String], "abcdefghijklmno…");
         EXPECT_STREQ([[WebStringTruncator centerTruncateString:@"ābcdefghijklmnopqrstuvwxyz" toWidth:100 withFont:[NSFont fontWithName:@"Helvetica" size:12]] UTF8String], "ābcdefg…tuvwxyz");