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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 23 10:32:17 PDT 2010


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





--- Comment #16 from Steve Block <steveblock at google.com>  2010-07-23 10:32:17 PST ---
The latest patch reflects my current thinking on the best way to add a mock for testing in a way that allows the mock to be shared between platforms. I've provided the new LayoutTestController methods, a common mock, and the plumbing for Mac. The patch isn't in a state that's ready for submission, but should demonstrate the idea.

The mock client implementation lives in WebCore/platform/mock/. Each platform's WebView passes a client implementation to the Page. In DRT, this implementation is the mock. Both the client interface and the mock will have to be exposed in WebKit, so WebKit wrappers are needed. The wrappers can be (largely) platform-independent, so are provided to prevent (most) platforms from having to replicate this wrapping. These are currently in a new WebKit/mock directory.

On Mac, because WebKit types are ObjectiveC, the shared WebKit wrappers can not be used. Instead, Mac provides its own wrappers around the WebCore types. Any platform is able to do this if need be.

Note that the changes to WebView.mm obviously aren't suitable for submission, as WebDeviceOrientationClient is added as a parameter to the main init method. The problem is that the Mac WebView instantiates the Page object directly from the init method, so a setter for the WebDeviceOrientationClient can't be used. One alternative is to modify the Page object to set the client with a setter, but this creates the problem of a time window in which the client is not set. Another possibility is for Mac to use proxy client, which can be later configured to use either the real or mock client, but this adds the need for more plumbing.

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