Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: webkit/tools/test_shell/test_geolocation_service.h

Issue 3294007: Make delayed-permission-denied-for-multiple-requests pass (Closed)
Patch Set: Add expectation override Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/tools/test_shell/test_geolocation_service.h
diff --git a/webkit/tools/test_shell/test_geolocation_service.h b/webkit/tools/test_shell/test_geolocation_service.h
index 0a0a1456d757f985499a67100c9e80889ff4cb87..cd6ce0016856919b5c9ba6141053842121c88486 100644
--- a/webkit/tools/test_shell/test_geolocation_service.h
+++ b/webkit/tools/test_shell/test_geolocation_service.h
@@ -45,15 +45,21 @@ class TestGeolocationService : public WebKit::WebGeolocationService {
virtual void detachBridge(int bridgeId);
private:
+ void TryToSendPermissions();
void SendPermission();
+ // Holds the value of |allowed| in most recent SetGeolocationPermission call.
bool allowed_;
+ // Remains false until the first SetGeolocationPermission call.
+ bool permission_set_;
IDMap<WebKit::WebGeolocationServiceBridge> bridges_map_;
base::OneShotTimer<TestGeolocationService> permission_timer_;
- std::vector<std::pair<int, bool> > pending_permissions_;
+ // In-order vector of pending bridge IDs. Is not pumped by
+ // TryToSendPermissions until the first call to SetGeolocationPermission.
+ std::vector<int> pending_permissions_;
DISALLOW_COPY_AND_ASSIGN(TestGeolocationService);
};

Powered by Google App Engine
This is Rietveld 408576698