WTR should use swizzling to set user defaults, since it doesn't want to set them for all WebProcesses
Created attachment 109391 [details]
I don’t understand what problem this is solving. Can you explain?
It seems that just registering the defaults is not enough, as the tests are still running with overlay scrollbars. Setting the default explicitly would change it for all WebProcesses, so this seemed like the best way to work around the issue.
Registering the default only makes a difference if it is not explicitly set in any other domain.
I believe the proper way to do this is to set the defaults in an appropriately-identified persistent domain (using -setPersistentDomain:forName:) and then add that domain to the search order (using -addSuiteNamed). It would be nicer to do this without persistence, but I am not sure if that’s possible, and WebKit1 DumpRenderTree doesn’t do so either.
I see now. Rather than creating a new volatile domain, you set the NSArgumentDomain, which is one of the volatile domains in the default search list (in fact, right at the top).
Comment on attachment 109391 [details]
Please use -setVolatileDomain:forName:NSArgumentDomain instead.
(In reply to comment #6)
> (From update of attachment 109391 [details])
> Please use -setVolatileDomain:forName:NSArgumentDomain instead.
Will do. Thanks for looking into an alternate way to do this.
Created attachment 109407 [details]
Comment on attachment 109407 [details]
This trumps over any arguments actually passed on the command line, but I suppose that’s ok because the UI process composes the command line.
Committed r96460: <http://trac.webkit.org/changeset/96460>