Changeset 64639 in webkit
- Timestamp:
- Aug 4, 2010, 4:13:20 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64631 r64639 1 2010-08-02 Steve Block <steveblock@google.com> 2 3 Reviewed by Alexey Proskuryakov. 4 5 Adds Geolocation LayoutTests for the case where permission is not granted or denied immediately 6 https://bugs.webkit.org/show_bug.cgi?id=40002 7 8 * fast/dom/Geolocation/delayed-permission-allowed-expected.txt: Added. 9 * fast/dom/Geolocation/delayed-permission-allowed.html: Added. 10 * fast/dom/Geolocation/delayed-permission-denied-expected.txt: Added. 11 * fast/dom/Geolocation/delayed-permission-denied.html: Added. 12 * fast/dom/Geolocation/script-tests/delayed-permission-allowed.js: Added. 13 * fast/dom/Geolocation/script-tests/delayed-permission-denied.js: Added. 14 * platform/gtk/Skipped: Added new tests to GTK skipped lists 15 1 16 2010-08-03 Alexey Proskuryakov <ap@apple.com> 2 17 -
trunk/LayoutTests/platform/gtk/Skipped
r64617 r64639 1088 1088 fast/dom/DeviceOrientation/window-property.html 1089 1089 fast/dom/Geolocation/callback-exception.html 1090 fast/dom/Geolocation/delayed-permission-allowed.html 1091 fast/dom/Geolocation/delayed-permission-denied.html 1090 1092 fast/dom/Geolocation/error.html 1091 1093 fast/dom/Geolocation/multiple-requests.html -
trunk/WebKitTools/ChangeLog
r64615 r64639 1 2010-08-02 Steve Block <steveblock@google.com> 2 3 Reviewed by Alexey Proskuryakov. 4 5 Adds Geolocation LayoutTests for the case where permission is not granted or denied immediately 6 https://bugs.webkit.org/show_bug.cgi?id=40002 7 8 The code in LayoutTestController::setGeolocationPermission() was moved to 9 setGeolocationPermissionCommon() to allow each port to provide its own 10 implementation of setGeolocationPermission(). 11 12 For the Mac port, setGeolocationPermission() notifies the UIDelegate of the 13 new permission, so it can call back to WebCore if permission requests are in 14 progress and are waiting for a response. A minor fix to the Mac 15 MockGeolocationProvider was also required to make sure that the mock provider 16 calls back to WebCore when it is first started. 17 18 For other ports, LayoutTestController::setGeolocationPermission() is not 19 implemented. 20 21 * DumpRenderTree/LayoutTestController.cpp: 22 (LayoutTestController::setGeolocationPermissionCommon): 23 * DumpRenderTree/LayoutTestController.h: 24 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: 25 (LayoutTestController::setGeolocationPermission): 26 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 27 (LayoutTestController::setGeolocationPermission): 28 * DumpRenderTree/mac/MockGeolocationProvider.mm: 29 (-[MockGeolocationProvider registerWebView:]): 30 * DumpRenderTree/mac/UIDelegate.h: 31 * DumpRenderTree/mac/UIDelegate.mm: 32 (-[UIDelegate webView:decidePolicyForGeolocationRequestFromOrigin:frame:listener:]): 33 (-[UIDelegate setGeolocationPermission:]): 34 (-[UIDelegate dealloc]): 35 * DumpRenderTree/win/LayoutTestControllerWin.cpp: 36 (LayoutTestController::setGeolocationPermission): 37 * DumpRenderTree/wx/LayoutTestControllerWx.cpp: 38 (LayoutTestController::setGeolocationPermission): 39 1 40 2010-08-03 Kent Tamura <tkent@chromium.org> 2 41 -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp
r64613 r64639 1976 1976 } 1977 1977 1978 void LayoutTestController::setGeolocationPermission (bool allow)1978 void LayoutTestController::setGeolocationPermissionCommon(bool allow) 1979 1979 { 1980 1980 m_isGeolocationPermissionSet = true; -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.h
r64613 r64639 293 293 LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash); 294 294 295 void setGeolocationPermissionCommon(bool allow); 296 295 297 bool m_dumpApplicationCacheDelegateCallbacks; 296 298 bool m_dumpAsPDF; -
trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r64613 r64639 463 463 } 464 464 465 void LayoutTestController::setGeolocationPermission(bool allow) 466 { 467 // FIXME: Implement for Geolocation layout tests. 468 setGeolocationPermissionCommon(allow); 469 } 470 465 471 void LayoutTestController::setIconDatabaseEnabled(bool flag) 466 472 { -
trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r64613 r64639 34 34 #import "MockGeolocationProvider.h" 35 35 #import "PolicyDelegate.h" 36 #import "UIDelegate.h" 36 37 #import "WorkQueue.h" 37 38 #import "WorkQueueItem.h" … … 356 357 } 357 358 359 void LayoutTestController::setGeolocationPermission(bool allow) 360 { 361 setGeolocationPermissionCommon(allow); 362 [[[mainFrame webView] UIDelegate] didSetMockGeolocationPermission]; 363 } 364 358 365 void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled) 359 366 { -
trunk/WebKitTools/DumpRenderTree/mac/MockGeolocationProvider.mm
r60488 r64639 75 75 { 76 76 _registeredViews.add(webView); 77 78 if (!_timer) 79 _timer = [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(timerFired) userInfo:0 repeats:NO]; 77 80 } 78 81 -
trunk/WebKitTools/DumpRenderTree/mac/UIDelegate.h
r29663 r64639 33 33 @private 34 34 NSRect m_frame; 35 NSMutableSet *m_pendingGeolocationPermissionListeners; 36 NSTimer *m_timer; 35 37 } 36 38 39 - (void)didSetMockGeolocationPermission; 40 37 41 @end -
trunk/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
r64613 r64639 186 186 - (void)webView:(WebView *)webView decidePolicyForGeolocationRequestFromOrigin:(WebSecurityOrigin *)origin frame:(WebFrame *)frame listener:(id<WebGeolocationPolicyListener>)listener 187 187 { 188 // FIXME: If mock permission isn't set yet, we should send the response asynchronously. 189 if (gLayoutTestController->isGeolocationPermissionSet() && gLayoutTestController->geolocationPermission()) 188 if (!gLayoutTestController->isGeolocationPermissionSet()) { 189 if (!m_pendingGeolocationPermissionListeners) 190 m_pendingGeolocationPermissionListeners = [[NSMutableSet set] retain]; 191 [m_pendingGeolocationPermissionListeners addObject:listener]; 192 return; 193 } 194 195 if (gLayoutTestController->geolocationPermission()) 190 196 [listener allow]; 191 197 else … … 193 199 } 194 200 201 - (void)didSetMockGeolocationPermission 202 { 203 ASSERT(gLayoutTestController->isGeolocationPermissionSet()); 204 if (m_pendingGeolocationPermissionListeners && !m_timer) 205 m_timer = [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(timerFired) userInfo:0 repeats:NO]; 206 } 207 208 - (void)timerFired 209 { 210 ASSERT(gLayoutTestController->isGeolocationPermissionSet()); 211 m_timer = 0; 212 NSEnumerator* enumerator = [m_pendingGeolocationPermissionListeners objectEnumerator]; 213 id<WebGeolocationPolicyListener> listener; 214 while ((listener = [enumerator nextObject])) { 215 if (gLayoutTestController->geolocationPermission()) 216 [listener allow]; 217 else 218 [listener deny]; 219 } 220 [m_pendingGeolocationPermissionListeners removeAllObjects]; 221 [m_pendingGeolocationPermissionListeners release]; 222 m_pendingGeolocationPermissionListeners = nil; 223 } 224 195 225 - (BOOL)webView:(WebView *)sender shouldHaltPlugin:(DOMNode *)pluginNode 196 226 { … … 208 238 [draggingInfo release]; 209 239 draggingInfo = nil; 240 [m_pendingGeolocationPermissionListeners release]; 241 m_pendingGeolocationPermissionListeners = nil; 210 242 211 243 [super dealloc]; -
trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r64613 r64639 394 394 } 395 395 396 void LayoutTestController::setGeolocationPermission(bool allow) 397 { 398 // FIXME: Implement for Geolocation layout tests. 399 setGeolocationPermissionCommon(allow); 400 } 401 396 402 void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled) 397 403 { -
trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
r64613 r64639 300 300 } 301 301 302 void LayoutTestController::setGeolocationPermission(bool allow) 303 { 304 // FIXME: Implement for Geolocation layout tests. 305 setGeolocationPermissionCommon(allow); 306 } 307 302 308 void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled) 303 309 {
Note:
See TracChangeset
for help on using the changeset viewer.