WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
77033
Implement overridePreference for boolean preferences in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=77033
Summary
Implement overridePreference for boolean preferences in WebKitTestRunner
Caio Marcelo de Oliveira Filho
Reported
2012-01-25 11:45:06 PST
Implement overridePreference for boolean preferences in WebKitTestRunner
Attachments
Patch
(17.65 KB, patch)
2012-01-25 11:52 PST
,
Caio Marcelo de Oliveira Filho
no flags
Details
Formatted Diff
Diff
Patch
(22.14 KB, patch)
2012-01-25 15:03 PST
,
Caio Marcelo de Oliveira Filho
no flags
Details
Formatted Diff
Diff
Patch for landing
(22.91 KB, patch)
2012-01-26 08:09 PST
,
Caio Marcelo de Oliveira Filho
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Caio Marcelo de Oliveira Filho
Comment 1
2012-01-25 11:52:18 PST
Created
attachment 123982
[details]
Patch
Alexey Proskuryakov
Comment 2
2012-01-25 12:09:58 PST
Comment on
attachment 123982
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=123982&action=review
What resets the preferences back for the next test? Please make sure that this is well understood before landing.
> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:67 > WK_EXPORT void WKBundleOverrideXSSAuditorEnabledForTestRunner(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
Can this be removed now?
Caio Marcelo de Oliveira Filho
Comment 3
2012-01-25 15:03:50 PST
Created
attachment 124020
[details]
Patch
Caio Marcelo de Oliveira Filho
Comment 4
2012-01-25 15:10:12 PST
(In reply to
comment #2
)
> (From update of
attachment 123982
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=123982&action=review
> > What resets the preferences back for the next test? Please make sure that this is well understood before landing.
Thanks for this question! I was overlooking the fact that: since properties were not changing, we were not updating the WebPreferencesStore. And worst, even if I forced an update, it would decode() before the the remove function was called. I made a small change to the initial patch: instead of overwriting the preferences, the getter now asks the override first. Also made an explicit function that WTR should call to force the update.
> > Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:67 > > WK_EXPORT void WKBundleOverrideXSSAuditorEnabledForTestRunner(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled); > > Can this be removed now?
Removed, using WKBundleOverrideBoolPreferenceForTestRunner() instead. Could you take another look at it?
Alexey Proskuryakov
Comment 5
2012-01-25 15:18:55 PST
Comment on
attachment 124020
[details]
Patch
> I made a small change to the initial patch: instead of overwriting the preferences, the getter now asks the override first.
Thanks! I'd appreciate a detailed explanation for posterity - I think that I understand what you're saying, but only barely, and it will be more difficult in a few months. I.e., what function gets called between tests, what preferences it resets, and how that filters down to each page.
Caio Marcelo de Oliveira Filho
Comment 6
2012-01-26 08:09:27 PST
Created
attachment 124118
[details]
Patch for landing
Caio Marcelo de Oliveira Filho
Comment 7
2012-01-26 08:14:02 PST
In the patch for landing I've improved the ChangeLog to explain in more detail how the preference override work.
WebKit Review Bot
Comment 8
2012-01-26 09:10:45 PST
Comment on
attachment 124118
[details]
Patch for landing Clearing flags on attachment: 124118 Committed
r106005
: <
http://trac.webkit.org/changeset/106005
>
WebKit Review Bot
Comment 9
2012-01-26 09:10:51 PST
All reviewed patches have been landed. Closing bug.
Alexey Proskuryakov
Comment 10
2012-01-26 09:29:10 PST
> This clearing could be improved by creating a proper message instead of hooking > at WebPage::preferencesDidChange().
Sounds like a good idea.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug