Changeset 158290 in webkit
- Timestamp:
- Oct 30, 2013, 11:04:41 AM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Tools/ChangeLog ¶
r158283 r158290 1 2013-10-30 Alexey Proskuryakov <ap@apple.com> 2 3 Mavericks: 128 tests are failing due to pixel differences 4 https://bugs.webkit.org/show_bug.cgi?id=123488 5 6 Reviewed by Simon Fraser. 7 8 Apple font preferences cannot be fully reset after they've been read, so we 9 need to set them using CFPreferences before initializing NSApplication. 10 11 In theory, this should be an issue on WebKit2 as well, but somehow it doesn't 12 appear to be. I guess we can figure out the reasons for this difference when/if 13 any observable problems start to occur. 14 15 * DumpRenderTree/mac/DumpRenderTree.mm: 16 (setDefaultsToConsistentValuesForTesting): Only set defaults here, move other work 17 to prepareConsistentTestingEnvironment(). 18 (main): Call setDefaultsToConsistentValuesForTesting before [NSApplication sharedApplication] 19 (which is unnecessary anyway since NSUserDefaults will implicitly call it, but seems 20 useful to keep in case we change out approach to defaults again). 21 1 22 2013-10-29 Andy Estes <aestes@apple.com> 2 23 -
TabularUnified trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm ¶
r158256 r158290 677 677 static void setDefaultsToConsistentValuesForTesting() 678 678 { 679 // FIXME: We'd like to start with a clean state for every test, but this function can't be used more than once yet.680 [WebPreferences _switchNetworkLoaderToNewTestingSession];681 682 679 static const int NoFontSmoothing = 0; 683 680 static const int BlueTintedAppearance = 1; 681 682 // These defaults are read at NSApplication initialization time, and there is no way to fully reset them afterwards. 683 // We have to use CFPreferences, because [NSUserDefaults standardUserDefaults] indirectly initializes NSApplication. 684 CFPreferencesSetAppValue(CFSTR("AppleFontSmoothing"), (CFNumberRef)@(NoFontSmoothing), kCFPreferencesCurrentApplication); 685 CFPreferencesSetAppValue(CFSTR("AppleAntiAliasingThreshold"), (CFNumberRef)@4, kCFPreferencesCurrentApplication); 686 CFPreferencesSetAppValue(CFSTR("AppleLanguages"), (CFArrayRef)@[ @"en" ], kCFPreferencesCurrentApplication); 684 687 685 688 NSString *libraryPath = libraryPathForDumpRenderTree(); … … 715 718 716 719 [[NSUserDefaults standardUserDefaults] setVolatileDomain:dict forName:NSArgumentDomain]; 717 718 // Underlying frameworks have already read AppleAntiAliasingThreshold default before we changed it.719 // A distributed notification is delivered to all applications, but it should be harmless, and it's the only way to update all underlying frameworks anyway.720 [[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"AppleAquaAntiAliasingChanged" object:nil userInfo:nil deliverImmediately:YES];721 722 NSURLCache *sharedCache =723 [[NSURLCache alloc] initWithMemoryCapacity:1024 * 1024724 diskCapacity:0725 diskPath:[libraryPath stringByAppendingPathComponent:@"URLCache"]];726 [NSURLCache setSharedURLCache:sharedCache];727 [sharedCache release];728 720 } 729 721 … … 849 841 poseAsClass("DumpRenderTreeEvent", "NSEvent"); 850 842 851 setDefaultsToConsistentValuesForTesting(); 843 // FIXME: We'd like to start with a clean state for every test, but this function can't be used more than once yet. 844 [WebPreferences _switchNetworkLoaderToNewTestingSession]; 845 846 NSURLCache *sharedCache = 847 [[NSURLCache alloc] initWithMemoryCapacity:1024 * 1024 848 diskCapacity:0 849 diskPath:[libraryPathForDumpRenderTree() stringByAppendingPathComponent:@"URLCache"]]; 850 [NSURLCache setSharedURLCache:sharedCache]; 851 [sharedCache release]; 852 852 853 adjustFonts(); 853 854 registerMockScrollbars(); … … 931 932 { 932 933 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 934 935 setDefaultsToConsistentValuesForTesting(); // Must be called before NSApplication initialization. 936 933 937 [DumpRenderTreeApplication sharedApplication]; // Force AppKit to init itself 934 938
Note:
See TracChangeset
for help on using the changeset viewer.