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

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 10070012: Geolocation support for chromedriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | content/browser/geolocation/geolocation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/ui_test_utils.cc
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index eede45053b18531aafb87e316bab4a448c500e86..3bb8ad30180aeb117bd941e12ea7f3dc6704d00d 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -47,6 +47,7 @@
#include "content/public/browser/dom_operation_notification_details.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
+#include "content/public/browser/geolocation.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
@@ -1190,6 +1191,12 @@ bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) {
return taker.TakeEntirePageSnapshot(rvh, bitmap);
}
+void OverrideGeolocation(double latitude, double longitude) {
+ content::OverrideLocationForTesting(
+ latitude, longitude, 0, base::Bind(MessageLoop::QuitClosure()));
+ RunMessageLoop();
+}
+
namespace internal {
void ClickTask(ui_controls::MouseButton button,
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | content/browser/geolocation/geolocation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698