[Webkit-unassigned] [Bug 39589] Add LayoutTestController methods to test DeviceOrientation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 21 12:48:17 PDT 2010


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





--- Comment #10 from Steve Block <steveblock at google.com>  2010-07-21 12:48:16 PST ---
> A setter would clean it up, while allowing the webkit layer to switch to the
> mock when necessary.
The more I think about it, the more I think that the argument about providing a mock isn't a good one. In all cases, (assuming the feature is enabled) we should provide a non-null client before the feature can be used ...
- For normal use, we provide the real client
- For DRT when the mock is always used, we provide the mock
- For DRT when a mock is injected in response to LayoutTestController method, we should use a proxy client that can handle switching between the real implementation and the mock

All of these can be achieved by passing a client to the constructor, without the need for a client setter method.

I think that an approach whereby the client is replaced with a mock in response to a LayoutTestController method, using a second call to a setter, is somewhat abusing the idea of a client.

I think the advantage of a setter method is that it avoids the long list of arguments to the page constructor.

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



More information about the webkit-unassigned mailing list