[webkit-dev] Settings and Preferences in layout tests

Adam Barth abarth at webkit.org
Wed Sep 26 16:43:58 PDT 2012


Maybe a better solution is auto-generate all this boilerplate code?  If we
had a Settings.in file, we could generate all the port-specific code (and
maybe even much of Settings.h/cpp) automatically.  Then all of these
patches would be one-liners and work correctly on every port.

Adam


On Wed, Sep 26, 2012 at 4:28 PM, Brady Eidson <beidson at apple.com> wrote:

>
> On Sep 26, 2012, at 4:15 PM, Simon Fraser <simon.fraser at apple.com> wrote:
>
> On Sep 26, 2012, at 4:13 PM, Brady Eidson <beidson at apple.com> wrote:
>
> This works for any preference;  Even a new one that has never been
> twiddled in a regression test before.
>
> For example in http://trac.webkit.org/changeset/127956 we added a new
> test that twiddled the "WebKitStorageBlockingPolicy" preference and we
> didn't need to change any DRT Mac code to accomplish this.
>
> Compared to adding a single implementation to internal.settings, this was
> *NO* additional work.
>
>
> But is there code to undo this pref change for subsequent tests?
>
>
> I looked into the mechanism that does this.
>
> On Sep 26, 2012, at 1:44 PM, Simon Fraser <simon.fraser at apple.com> wrote:
>
> I looked at testRunner.overridePreference(), and it doesn't appear to
> reset the value at the end of the test.
>
>
> That happens elsewhere, in:
> static void resetDefaultsToConsistentValues()
>
> Indeed, each individual pref is currently managed with unique API calls
> here, and the example I provided of WebKitStorageBlockingPolicy leaks.
>
> However, the key/value based preference mechanism can easily be augmented
> within DRT in a general way that will fix this and all future key/value
> preference usage.  That change would only have to happen once per port
> (assuming the port supports key/value based prefs)
>
>  Brady
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120926/f531f540/attachment.html>


More information about the webkit-dev mailing list