Bug 139347

Summary: [Mac] DumpRenderTree sets storage directory incorrectly
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Tools / TestsAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, dino, mitz, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 138958    
Attachments:
Description Flags
proposed fix
ap: review-
proposed fix none

Alexey Proskuryakov
Reported 2014-12-06 13:05:24 PST
Storage tests are flaky in WebKit1, because DumpRenderTree effectively makes all parallel processes use the same temporary directory. I hope that this fix will address increased appcache test flakiness that started this week, when I changed DRT to delete appcache between tests - this made sqlite race for access to ApplicationCache.db a lot more than before.
Attachments
proposed fix (1.33 KB, patch)
2014-12-06 13:11 PST, Alexey Proskuryakov
ap: review-
proposed fix (2.46 KB, patch)
2014-12-06 13:35 PST, Alexey Proskuryakov
no flags
Alexey Proskuryakov
Comment 1 2014-12-06 13:11:10 PST
Created attachment 242724 [details] proposed fix
Alexey Proskuryakov
Comment 2 2014-12-06 13:22:11 PST
I'm now trying to remember if we needed to set standard defaults in order to make frameworks that use CFPreferences work...
Alexey Proskuryakov
Comment 3 2014-12-06 13:27:42 PST
Comment on attachment 242724 [details] proposed fix Bummer. http://trac.webkit.org/changeset/158652 says: -------------- Using NSArgumentDomain was not a good idea. While it works with NSUserDefaults and CFPreferencesCopyAppValue family of functions, it doesn't work with CFPreferencesCopyValue(..., kCFPreferencesCurrentApplication, ...). -------------- So, we should use NSArgumentDomain only for per instance preferences.
Alexey Proskuryakov
Comment 4 2014-12-06 13:35:03 PST
Created attachment 242726 [details] proposed fix Looking at WebKit1 code, we have a bunch of unfortunate special cases that bypass WebPreferences, and use NSUserDefaults directly. WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey is read and written by WebView, so it's global per process identifier, and cannot be different in different WebViews or in parallel DumpRenderTrees. Same thing with these ones, which are further complicated due to interactions between WebKit and AppKit preferences: [webView setContinuousSpellCheckingEnabled:YES]; [webView setAutomaticQuoteSubstitutionEnabled:NO]; [webView setAutomaticLinkDetectionEnabled:NO]; [webView setAutomaticDashSubstitutionEnabled:NO]; [webView setAutomaticTextReplacementEnabled:NO]; [webView setAutomaticSpellingCorrectionEnabled:YES]; [webView setGrammarCheckingEnabled:YES];
WebKit Commit Bot
Comment 5 2014-12-06 15:52:03 PST
Comment on attachment 242726 [details] proposed fix Clearing flags on attachment: 242726 Committed r176917: <http://trac.webkit.org/changeset/176917>
WebKit Commit Bot
Comment 6 2014-12-06 15:52:06 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.