Further tweak results of WebKit1.StringTruncator after r184965.
[WebKit-https.git] / Tools / TestWebKitAPI / Tests / mac / StringTruncator.mm
index 577d035f6edfbb72e6741ae8d35d5fb635e50cda..4c0b682c6892d95b8d0614a8e5ea94ef9a1f2119 100644 (file)
@@ -34,7 +34,11 @@ TEST(WebKit1, StringTruncator)
 {
     @autoreleasepool {
         EXPECT_STREQ([[WebStringTruncator centerTruncateString:@"abcdefghijklmnopqrstuvwxyz" toWidth:100 withFont:[NSFont fontWithName:@"Helvetica" size:12]] UTF8String], "abcdefg…tuvwxyz");
+#if __MAC_OS_X_VERSION_MIN_REQUIRED > 101000
+        EXPECT_STREQ([[WebStringTruncator centerTruncateString:@"abcdefghijklmnopqrstuvwxyz" toWidth:100] UTF8String], "abcdef…uvwxyz");
+#else
         EXPECT_STREQ([[WebStringTruncator centerTruncateString:@"abcdefghijklmnopqrstuvwxyz" toWidth:100] UTF8String], "abcdef…vwxyz");
+#endif
         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");
         EXPECT_STREQ([[WebStringTruncator rightTruncateString:@"ābcdefghijklmnopqrstuvwxyz" toWidth:100 withFont:[NSFont fontWithName:@"Helvetica" size:12]] UTF8String], "ābcdefghijklmno…");