[Mac] Rationalize user defaults override code
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 17:47:46 +0000 (17:47 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 17:47:46 +0000 (17:47 +0000)
commit8b9b9f6d08d4da5877ccd9de9ba9a2fca5589530
tree8bf4542bdd31b602b1e78ad910e00c0782d60858
parent09dd06d4bc2dd5434fe380f445a092b0b44d5d77
[Mac] Rationalize user defaults override code
https://bugs.webkit.org/show_bug.cgi?id=123436

Reviewed by Dan Bernstein.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues): Renamed from resetDefaultsToConsistentValues,
because this function only resets WebPreferences now.
(setDefaultsToConsistentValuesForTesting): Moved code for setting the defaults
here, because tests never change them, and they only need to be set once, not
before each test. Removed long obsolete workaround for HIToolbox preferences.
Don't call resetWebPreferencesToConsistentValues, because it will be called before
the first test anyway.
(main): Don't set AppleMagnifiedMode here, moved that to setDefaultsToConsistentValuesForTesting.
(resetWebViewToConsistentStateBeforeTesting): Moved TestRunner::setSerializeHTTPLoads
and setlocale calls out of resetWebPreferencesToConsistentValues().
Added AppleAquaAntiAliasingChanged notification that we had in WK2, because it's
also needed in WK1.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize): Use literal syntax for defaults
dictionary.

* WebKitTestRunner/mac/main.mm:
(setDefaultsToConsistentValuesForTesting): Factored out of main(), and changed to
use NSArgumentDomain for everything.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm
Tools/WebKitTestRunner/mac/main.mm