Adds Geolocation LayoutTests for the case where permission is not granted or denied...
authorsteveblock@google.com <steveblock@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Aug 2010 11:13:20 +0000 (11:13 +0000)
committerSimon Hausmann <simon.hausmann@nokia.com>
Wed, 25 Aug 2010 11:48:54 +0000 (13:48 +0200)
commit741b9a8007571c1a8907f4de91f7dd9f6b3c345e
treec65acea2396e6487aba8595d7e80b47ba4022026
parent089151ec4f583359d129fdc3c5246d247962aa7c
Adds Geolocation LayoutTests for the case where permission is not granted or denied immediately
https://bugs.webkit.org/show_bug.cgi?id=40002

Reviewed by Alexey Proskuryakov.

WebKitTools:

The code in LayoutTestController::setGeolocationPermission() was moved to
setGeolocationPermissionCommon() to allow each port to provide its own
implementation of setGeolocationPermission().

For the Mac port, setGeolocationPermission() notifies the UIDelegate of the
new permission, so it can call back to WebCore if permission requests are in
progress and are waiting for a response. A minor fix to the Mac
MockGeolocationProvider was also required to make sure that the mock provider
calls back to WebCore when it is first started.

For other ports, LayoutTestController::setGeolocationPermission() is not
implemented.

* DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::setGeolocationPermissionCommon):
* DumpRenderTree/LayoutTestController.h:
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::setGeolocationPermission):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::setGeolocationPermission):
* DumpRenderTree/mac/MockGeolocationProvider.mm:
(-[MockGeolocationProvider registerWebView:]):
* DumpRenderTree/mac/UIDelegate.h:
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:decidePolicyForGeolocationRequestFromOrigin:frame:listener:]):
(-[UIDelegate setGeolocationPermission:]):
(-[UIDelegate dealloc]):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::setGeolocationPermission):
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
(LayoutTestController::setGeolocationPermission):

LayoutTests:

* fast/dom/Geolocation/delayed-permission-allowed-expected.txt: Added.
* fast/dom/Geolocation/delayed-permission-allowed.html: Added.
* fast/dom/Geolocation/delayed-permission-denied-expected.txt: Added.
* fast/dom/Geolocation/delayed-permission-denied.html: Added.
* fast/dom/Geolocation/script-tests/delayed-permission-allowed.js: Added.
* fast/dom/Geolocation/script-tests/delayed-permission-denied.js: Added.
* platform/gtk/Skipped: Added new tests to GTK skipped lists

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Geolocation/delayed-permission-allowed-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/delayed-permission-allowed.html [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/delayed-permission-denied-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/delayed-permission-denied.html [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed.js [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied.js [new file with mode: 0644]
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/LayoutTestController.cpp
WebKitTools/DumpRenderTree/LayoutTestController.h
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
WebKitTools/DumpRenderTree/mac/MockGeolocationProvider.mm
WebKitTools/DumpRenderTree/mac/UIDelegate.h
WebKitTools/DumpRenderTree/mac/UIDelegate.mm
WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp