[Webkit-unassigned] [Bug 173714] Use window.internals instead of overridePreference to set WebCore settings in tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 22 11:22:26 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=173714

Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joepeck at webkit.org

--- Comment #10 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 313615
  --> https://bugs.webkit.org/attachment.cgi?id=313615
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=313615&action=review

> LayoutTests/ChangeLog:4
> +        Use window.internals instead of overridePreference to set WebCore settings in tests
> +        https://bugs.webkit.org/show_bug.cgi?id=173714

With this change you should be able to eliminate any no longer used settings from InjectedBundle::overrideBoolPreferenceForTestRunner.

> LayoutTests/ChangeLog:7
> +

We try to include a description of the change here in the ChangeLog if it is not immediately obvious from the title.

> LayoutTests/accessibility/gtk/caret-browsing-select-focus.html:17
> +if (window.testRunner && window.internals) {
> +  internals.setEnableCaretBrowsing(true);

I'm a bit confused by these changes. I don't think `internals.setEnableCaretBrowsing` exists. Perhaps `internals.settings.setEnableCaretBrowsing` does?

To clarify my earlier comment from:
https://bugs.webkit.org/show_bug.cgi?id=128594#c3

I think, where possible, we should move:

    testRunner.overridePreference("WebKitFooEnabled", true);

to:

    internals.settings.setFooEnabled(true)

Since using internals.settings is more direct, would fail immediately and obviously if its a function that does not exist, and these settings are restored properly between tests.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170622/58d81564/attachment.html>


More information about the webkit-unassigned mailing list