Bug 29751

Summary: DumpRenderTree should reset its preferences file on launch
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, kbr, mitz, rniwa, simon.fraser, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
proposed fix
rniwa: review+, buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2
none
patch for landing
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion
none
how about this? mitz: review+

Eric Seidel (no email)
Reported 2009-09-25 15:13:12 PDT
DumpRenderTree should reset its preferences file on launch DRT has a function resetDefaultsToConsistentValues() which is supposed to set the defaults to exactly how we want them for testing. If you happen to have a default set from a previous run of DRT which you no longer want set it will not remove that default. It should. This is what was causing the commit-bot failures landing bug 29612. My fix for bug 28624 which disables Hardware compositing was sticking in DRT's preferences and not getting reset, even though that change has not landed yet. I had expected that DRT started from a clean slate of preferences every time, but it does not.
Attachments
proposed fix (1.92 KB, patch)
2013-10-30 00:01 PDT, Alexey Proskuryakov
rniwa: review+
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 (581.18 KB, application/zip)
2013-10-30 02:23 PDT, Build Bot
no flags
patch for landing (1.52 KB, patch)
2013-10-30 12:42 PDT, Alexey Proskuryakov
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion (1.23 MB, application/zip)
2013-10-30 16:35 PDT, Build Bot
no flags
how about this? (8.05 KB, patch)
2013-11-04 00:10 PST, Alexey Proskuryakov
mitz: review+
Eric Seidel (no email)
Comment 1 2009-09-25 15:16:55 PDT
Basically we want to do: "defaults delete DumpRenderTree" (DumpRenderTree is the "domain" name for DRT's preferences.) I just don't know how to do that in code via NSUserDefaults.
Alexey Proskuryakov
Comment 2 2013-10-30 00:01:48 PDT
Created attachment 215476 [details] proposed fix
Ryosuke Niwa
Comment 3 2013-10-30 00:03:39 PDT
Comment on attachment 215476 [details] proposed fix View in context: https://bugs.webkit.org/attachment.cgi?id=215476&action=review > Tools/DumpRenderTree/mac/DumpRenderTree.mm:680 > + [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:@"DumpRenderTree"]; > + Does this work if we ran DumpRenderTree concurrently as done in NRWT?
Alexey Proskuryakov
Comment 4 2013-10-30 00:07:43 PDT
It should be fine - running instances have settings in memory, and won't be affected by them being deleted from persistent storage.
Ryosuke Niwa
Comment 5 2013-10-30 00:08:16 PDT
Comment on attachment 215476 [details] proposed fix Okay!
Alexey Proskuryakov
Comment 6 2013-10-30 01:24:27 PDT
This test fails WK1 EWS likely because of AppleFontSmoothing issues similar to what we recently saw because of PDFKit. Perhaps it needs to be set before NSApplication is instantiated, or somehow reset after being changed. We might be seeing the same on some Mavericks bots that didn't have this preference synchronized to DumpRenderTree persistent defaults before I changed DumpRenderTree to use argument domain today.
Build Bot
Comment 7 2013-10-30 02:23:06 PDT
Comment on attachment 215476 [details] proposed fix Attachment 215476 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/17658148 New failing tests: fast/events/scrollbar-double-click.html
Build Bot
Comment 8 2013-10-30 02:23:08 PDT
Created attachment 215485 [details] Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-14 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Alexey Proskuryakov
Comment 9 2013-10-30 12:42:18 PDT
Created attachment 215551 [details] patch for landing AppleFontSmoothing got fixed in <http://trac.webkit.org/changeset/158290>. Let's run EWS again. I also removed WebKit2 parts, let's do that separately in bug 115115.
Alexey Proskuryakov
Comment 10 2013-10-30 12:48:03 PDT
*** Bug 31129 has been marked as a duplicate of this bug. ***
Build Bot
Comment 11 2013-10-30 16:35:48 PDT
Comment on attachment 215551 [details] patch for landing Attachment 215551 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/17758019 New failing tests: css2.1/20110323/text-indent-014.htm css2.1/20110323/overflow-applies-to-007.htm fast/block/float/floats-wrap-inside-inline-007.html fast/inline/layout-after-inserting-nested-br.html css2.1/20110323/border-conflict-element-001d.htm fast/block/float/floats-wrap-inside-inline-003.htm fast/block/float/max-width-clear-float-with-overflow-hidden.html csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002.html canvas/philip/tests/2d.text.draw.baseline.ideographic.html css2.1/20110323/overflow-applies-to-013.htm fast/multicol/newmulticol/float-paginate-complex.html csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-padding-001.html css2.1/20110323/overflow-applies-to-014.htm fast/css/text-indent-first-line-006.html csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-004.html css2.1/20110323/overflow-applies-to-015.htm fast/css/text-indent-first-line-005.html fast/css/text-indent-first-line-004.html csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-padding-002.html fast/multicol/newmulticol/direct-child-column-span-all.html fast/multicol/newmulticol/columns-shorthand-parsing.html fast/css/text-indent-first-line-003.html fast/css/text-indent-first-line-001.html fast/css/text-indent-first-line-002.html fast/multicol/newmulticol/column-rules-fixed-height.html csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-padding-004.html css2.1/20110323/overflow-applies-to-012.htm css2.1/20110323/overflow-applies-to-010.htm csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-padding-003.html css2.1/20110323/c541-word-sp-001.htm
Build Bot
Comment 12 2013-10-30 16:35:51 PDT
Created attachment 215571 [details] Archive of layout-test-results from webkit-ews-01 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-01 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Alexey Proskuryakov
Comment 13 2013-11-04 00:10:18 PST
Created attachment 215892 [details] how about this? I was misunderstanding the inner workings quite a bit... Hopefully, this will work better.
mitz
Comment 14 2013-11-04 07:16:54 PST
Comment on attachment 215892 [details] how about this? View in context: https://bugs.webkit.org/attachment.cgi?id=215892&action=review > Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:66 > + [[NSUserDefaults standardUserDefaults] setValuesForKeysWithDictionary:dict]; Which domain does this write the defaults (persistently) into? WebKitTestRunner’s or the web content service’s?
Alexey Proskuryakov
Comment 15 2013-11-04 09:02:58 PST
Hmm. Looks like it's ~/Library/Preferences/com.apple.WebKit.WebContent{.Development}. I'll take out the InjectedBundle change if everything else is OK.
mitz
Comment 16 2013-11-04 20:43:45 PST
(In reply to comment #15) > Hmm. Looks like it's ~/Library/Preferences/com.apple.WebKit.WebContent{.Development}. > > I'll take out the InjectedBundle change if everything else is OK. Now that I look at the other parts, I am confused. Will kCFPreferencesCurrentApplication look in the global domain if the default isn’t set in the app’s domain? If not, it seems like this would break the normal use case of using System Preferences to change this setting. Why can’t WebKit just use [NSUserDefaults standardUserDefaults] now that it doesn’t need to look in the Universal Access domain?
Alexey Proskuryakov
Comment 17 2013-11-04 22:31:57 PST
> Will kCFPreferencesCurrentApplication look in the global domain if the default isn’t set in the app’s domain? Yes, when used with CFPreferencesGetAppIntegerValue. Presumably not with CFPreferencesCopyValue, although I didn't check that. These "app" functions are exactly what NSUserDefaults use inside. If I comment out "@"AppleKeyboardUIMode": @1," in DRT, then platform/mac/fast/forms/focus-option-control-on-page.html regression test starts to depend on system preference for FKA. > Why can’t WebKit just use [NSUserDefaults standardUserDefaults] now that it doesn’t need to look in the Universal Access domain? Yes, it could. I don't think that there is any reason to, CFPreferences is exactly the same thing, but it avoids some function call overhead.
mitz
Comment 18 2013-11-04 22:36:02 PST
Comment on attachment 215892 [details] how about this? r=me without the WKTR Injected Bundle change
Alexey Proskuryakov
Comment 19 2013-11-04 23:04:15 PST
Note You need to log in before you can comment on or make changes to this bug.