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

Unified Diff: webkit/tools/test_shell/test_shell.cc

Issue 5612005: Client-based geolocation support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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_shell.cc
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index cb1e00700c51b90079a6e07391bf30597f807e6f..0d4b10448869c7047adb1a30e2f50cdd90e04d14 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -34,6 +34,9 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDeviceOrientationClientMock.h"
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
+#endif
#include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputControllerMock.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
@@ -647,6 +650,11 @@ void TestShell::ResetTestController() {
event_sending_controller_->Reset();
notification_presenter_->Reset();
delegate_->Reset();
+#if ENABLE_CLIENT_BASED_GEOLOCATION
joth 2010/12/07 10:24:51 if defined() ?
John Knottenbelt 2010/12/07 12:30:04 Good spot!
+ // Ensure a fresh (unset) state for next test run
bulach 2010/12/07 11:18:42 comment seems a bit unnecessary.
John Knottenbelt 2010/12/07 12:30:04 Removed.
+ if (geolocation_client_mock_.get())
+ geolocation_client_mock_->resetMock();
+#endif
}
void TestShell::LoadFile(const FilePath& file) {
@@ -786,6 +794,16 @@ TestShell::speech_input_controller_mock() {
return speech_input_controller_mock_.get();
}
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() {
+ if (!geolocation_client_mock_.get()) {
+ geolocation_client_mock_.reset(
+ WebKit::WebGeolocationClientMock::create());
+ }
+ return geolocation_client_mock_.get();
+}
+#endif
+
//-----------------------------------------------------------------------------
namespace webkit_glue {

Powered by Google App Engine
This is Rietveld 408576698