[Webkit-unassigned] [Bug 20534] DumpRenderTree needs a way to override settings on a per-test basis

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 28 09:26:30 PDT 2008


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


wilsong at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|webkit-                     |wilsong at gmail.com
                   |unassigned at lists.webkit.org |
             Status|NEW                         |ASSIGNED
  Attachment #23056|                            |review?
               Flag|                            |




------- Comment #1 from wilsong at gmail.com  2008-08-28 09:26 PDT -------
Created an attachment (id=23056)
 --> (https://bugs.webkit.org/attachment.cgi?id=23056&action=view)
Possible patch to issue 20534

Here is a possible patch to this issue.  There are some questions that still
remain, however.

This patch allows a layout test to override a default WebPreference value at
test time.  For instance:

layoutTestController.overridePreference("WebKitJavaScriptEnabled", false);

will turn javascript off for the rest of the test.

Several decisions/observations I made:

1.  To keep things simple, I only developed this patch to set or unset boolean
flags.  
It would be possible to add other methods that set string or integer values,
but it would either require IWebPreferences.idl to handle classes it probably
shouldn't (CFPropertyListRef), or multiple methods in LayoutTestController to
accept multiple input data types.  Both of those options seemed less than
appealing to me, but I'm hoping for feedback about what to do there.

2.  Overriding the flag seems to only work once per layout test -- that is, you
cannot disable javascript, try to do some javascript work, then re-enable
javascript.  I'm thinking that this is an effect of layoutTestController, and
not the new overridePreference method.

3.  The key values used in the call (i.e. "WebKitJavaScriptEnabled") are drawn
directly from WebPreferences.  So if there is a key in the dictionary with a
boolean value set for it, then it can be set.  I added multiple erroneous calls
in the layout test to illustrate that passing bad input to overridePreference
would not crash the test.

What else should be done here?


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list