[webkit-dev] Sharing WebKit mocks across platforms

Adam Barth abarth at webkit.org
Fri Jul 30 07:24:33 PDT 2010


On Fri, Jul 30, 2010 at 2:56 AM, Steve Block <steveblock at google.com> wrote:
>> WebCore::LayoutTestController would be exposed to JavaScript running
>> in LayoutTests directly (like the DOM), so we can skip the type
>> conversions.
>
> There might still be the need for some plumbing though. In the case of
> DeviceOrientation and SpeechInput, we're mocking a client which is
> provided by WebKit. Even though the mock implementation happens to
> live in WebCore, it's instantiated and owned by the WebKit layer.

Why not instantiate and own the object in WebCore?  In fact, perhaps
the testController (or whatever we want to call the WebCore test
helper object) so both instantiate and own the client.

> So in order for LayoutTestController to configure the mock (eg
> layoutTestController.setMockOrientation(...)), we need to route calls
> from the WebCore LayoutTestController up to WebKit. I guess you could
> use a new LayoutTestControllerClient. I think you're right though that
> this could be done without the need for type conversions, as none of
> this is exposed in the WebKit API.

Yep.

Adam


More information about the webkit-dev mailing list