Bug 77991 - [BlackBerry] Upstream DumpRenderTreeSupport
: [BlackBerry] Upstream DumpRenderTreeSupport
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: Tools / Tests
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Rob Buis
:
Depends on:
Blocks: 73144
  Show dependency treegraph
 
Reported: 2012-02-07 08:27 PST by Rob Buis
Modified: 2012-02-07 14:52 PST (History)
1 user (show)

See Also:


Attachments
Patch (10.93 KB, patch)
2012-02-07 09:10 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (10.95 KB, patch)
2012-02-07 11:28 PST, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2012-02-07 08:27:04 PST
This is a helper class for DRT similar to DumpRenderTreeSupportQt.
Comment 1 Rob Buis 2012-02-07 09:10:50 PST
Created attachment 125859 [details]
Patch
Comment 2 Antonio Gomes 2012-02-07 11:05:38 PST
Comment on attachment 125859 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=125859&action=review

r+ with nits fixed.

> Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp:2
> + * Copyright (C) 2011 Research In Motion Limited. All rights reserved.

2012

> Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp:100
> +#else
> +    return -1;

unused_param(webpage) here.

> Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp:110
> +void DumpRenderTreeSupport::resetGeolocationMock(WebPage* webPage)
> +{
> +#if ENABLE(CLIENT_BASED_GEOLOCATION)
> +    GeolocationClientMock* mockClient = toGeolocationClientMock(webPage->mainFrame()->page()->geolocationController()->client());
> +    mockClient->reset();
> +#endif
> +}

ditto

> Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp:128
> +void DumpRenderTreeSupport::setMockGeolocationError(WebPage* webPage, int errorCode, const String message)
> +{
> +#if ENABLE(CLIENT_BASED_GEOLOCATION)
> +    GeolocationError::ErrorCode code = GeolocationError::PositionUnavailable;
> +    switch (errorCode) {
> +    case PositionError::PERMISSION_DENIED:
> +        code = GeolocationError::PermissionDenied;
> +        break;
> +    case PositionError::POSITION_UNAVAILABLE:
> +        code = GeolocationError::PositionUnavailable;
> +        break;
> +    }
> +
> +    GeolocationClientMock* mockClient = static_cast<GeolocationClientMock*>(webPage->mainFrame()->page()->geolocationController()->client());
> +    mockClient->setError(GeolocationError::create(code, message));
> +#endif
> +}

ditto

> Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp:136
> +void DumpRenderTreeSupport::setMockGeolocationPermission(WebPage* webPage, bool allowed)
> +{
> +#if ENABLE(CLIENT_BASED_GEOLOCATION)
> +    GeolocationClientMock* mockClient = toGeolocationClientMock(webPage->mainFrame()->page()->geolocationController()->client());
> +    mockClient->setPermission(allowed);
> +#endif
> +}

ditto, and everywhere else...

> Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.h:2
> + * Copyright (C) 2011 Research In Motion Limited. All rights reserved.

2012

> Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.h:52
> +    static int numberOfPendingGeolocationPermissionRequests(BlackBerry::WebKit::WebPage*);

no need for blackberry::webkit (?)

> Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.h:53
> +    static void resetGeolocationMock(BlackBerry::WebKit::WebPage*);

ditto and everyelse
Comment 3 Rob Buis 2012-02-07 11:28:07 PST
Created attachment 125882 [details]
Patch
Comment 4 WebKit Review Bot 2012-02-07 14:52:41 PST
Comment on attachment 125882 [details]
Patch

Clearing flags on attachment: 125882

Committed r106993: <http://trac.webkit.org/changeset/106993>
Comment 5 WebKit Review Bot 2012-02-07 14:52:50 PST
All reviewed patches have been landed.  Closing bug.