Font fallback in WebKitTestRunner depends on user settings
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 22:30:52 +0000 (22:30 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 22:30:52 +0000 (22:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81978

Reviewed by Jessie Berlin.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize): Added an AppleLanguages key
with a value consisting of the array ("en") to the override defaults
dictionary. This is the same value used in DumpRenderTree, and it
ensures that font fallback follows a consistent path that is not
affected by the language preferences of the user running the test.

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

Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm

index 0e441909939cebf7250d30a6c708767375583b04..2afe584f6092d2d3240d7401d6466e214dc0abc3 100644 (file)
@@ -1,3 +1,17 @@
+2012-03-22  Dan Bernstein  <mitz@apple.com>
+
+        Font fallback in WebKitTestRunner depends on user settings
+        https://bugs.webkit.org/show_bug.cgi?id=81978
+
+        Reviewed by Jessie Berlin.
+
+        * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
+        (WTR::InjectedBundle::platformInitialize): Added an AppleLanguages key
+        with a value consisting of the array ("en") to the override defaults
+        dictionary. This is the same value used in DumpRenderTree, and it
+        ensures that font fallback follows a consistent path that is not
+        affected by the language preferences of the user running the test.
+
 2012-03-22  Andy Estes  <aestes@apple.com>
 
         check-for-inappropriate-objc-class-names should ignore the class defined by libarclite.
 2012-03-22  Andy Estes  <aestes@apple.com>
 
         check-for-inappropriate-objc-class-names should ignore the class defined by libarclite.
index 33f395be76cad967cf418aa8fe03ced226510bd0..1bbff4156b20b7c6722a22f5545784c4046c4388 100644 (file)
@@ -37,6 +37,7 @@ void InjectedBundle::platformInitialize(WKTypeRef)
         [NSNumber numberWithBool:NO],     @"AppleScrollAnimationEnabled",
         [NSNumber numberWithBool:NO],     @"NSOverlayScrollersEnabled",
         @"Always",                        @"AppleShowScrollBars",
         [NSNumber numberWithBool:NO],     @"AppleScrollAnimationEnabled",
         [NSNumber numberWithBool:NO],     @"NSOverlayScrollersEnabled",
         @"Always",                        @"AppleShowScrollBars",
+        [NSArray arrayWithObject:@"en"],  @"AppleLanguages",
         nil];
 
     [[NSUserDefaults standardUserDefaults] setVolatileDomain:dict forName:NSArgumentDomain];    
         nil];
 
     [[NSUserDefaults standardUserDefaults] setVolatileDomain:dict forName:NSArgumentDomain];