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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 16 06:56:48 PDT 2010


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





--- Comment #6 from Steve Block <steveblock at google.com>  2010-07-16 06:56:47 PST ---
> An alternative would be to have the WebViewCore simply provide either
> DeviceOrientationClientImpl or DeviceOrientationClientMock when instantiating
> the Page object, thus eliminating the DeviceOrientationClientAndroid proxy. The
> disadvantage of this approach is that the decision to use the mock would then
> have to be made at start-up time. DumpRenderTree would have to set the use of
> the mock when configuring the WebViewCore. This means that no layout tests can
> use the real DeviceOrientationClient implementation.
Looking at the Mac implementation of WebView and DumpRenderTree, the page object is instantiated immediately from WebView.initWithFrame. So if we're to add the ability to configure the WebView to use the mock DeviceOrientationClient, we need to either ...
- Add 'useMockDeviceOrientationClient' parameter to WebView.initWithFrame.
- Add a WebView.useMockDeviceOrientationClient method, and modify Page to use a new setDeviceOrientationClient method, rather than the DeviceOrientationClient constructor argument.

This former approach isn't scalable. The latter is, and by removing the DeviceOrientationClient argument from the Page constructor, avoids the scalability problem there too. Note that this approach was taken for the SpeechInputClient in Bug 41518.

I think it's probably best to make the change to add Page.setDeviceOrientationClient. What do you think?

-- 
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