summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 17:26:33 +0000
committerjknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 17:26:33 +0000
commit24ebb8c857a6c479854c328b9d5b0bc44292f415 (patch)
treeaaadc1d40e9eff51c112428c418f77d0bdb58c75 /webkit
parent878761aef2460c1c2b8922e3e4c5da234f5c7b60 (diff)
downloadchromium_src-24ebb8c857a6c479854c328b9d5b0bc44292f415.zip
chromium_src-24ebb8c857a6c479854c328b9d5b0bc44292f415.tar.gz
chromium_src-24ebb8c857a6c479854c328b9d5b0bc44292f415.tar.bz2
Revert rev 69137 due to incorrect change log.
BUG=None TEST=None Review URL: http://codereview.chromium.org/5744005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc24
-rw-r--r--webkit/tools/test_shell/test_shell.cc17
-rw-r--r--webkit/tools/test_shell/test_shell.gypi3
-rw-r--r--webkit/tools/test_shell/test_shell.h8
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc13
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h10
6 files changed, 1 insertions, 74 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 3ddfaab..16d7bcd 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -26,11 +26,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/WebKit/chromium/public/WebElement.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
-#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
-#else
#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationServiceMock.h"
-#endif
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityPolicy.h"
@@ -56,16 +52,13 @@ using std::wstring;
using WebKit::WebBindings;
using WebKit::WebConsoleMessage;
using WebKit::WebElement;
+using WebKit::WebGeolocationServiceMock;
using WebKit::WebScriptSource;
using WebKit::WebSecurityPolicy;
using WebKit::WebSize;
using WebKit::WebString;
using WebKit::WebURL;
-#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION)
-using WebKit::WebGeolocationServiceMock;
-#endif
-
TestShell* LayoutTestController::shell_ = NULL;
// Most of these flags need to be cleared in Reset() so that they get turned
// off between each test run.
@@ -1500,12 +1493,7 @@ void LayoutTestController::setGeolocationPermission(const CppArgumentList& args,
CppVariant* result) {
if (args.size() < 1 || !args[0].isBool())
return;
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
- shell_->geolocation_client_mock()->setPermission(
- args[0].ToBoolean());
-#else
shell_->delegate()->SetGeolocationPermission(args[0].ToBoolean());
-#endif
}
void LayoutTestController::setMockGeolocationPosition(
@@ -1513,26 +1501,16 @@ void LayoutTestController::setMockGeolocationPosition(
if (args.size() < 3 ||
!args[0].isNumber() || !args[1].isNumber() || !args[2].isNumber())
return;
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
- shell_->geolocation_client_mock()->setPosition(
- args[0].ToDouble(), args[1].ToDouble(), args[2].ToDouble());
-#else
WebGeolocationServiceMock::setMockGeolocationPosition(
args[0].ToDouble(), args[1].ToDouble(), args[2].ToDouble());
-#endif
}
void LayoutTestController::setMockGeolocationError(const CppArgumentList& args,
CppVariant* result) {
if (args.size() < 2 || !args[0].isNumber() || !args[1].isString())
return;
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
- shell_->geolocation_client_mock()->setError(
- args[0].ToInt32(), WebString::fromUTF8(args[1].ToString()));
-#else
WebGeolocationServiceMock::setMockGeolocationError(
args[0].ToInt32(), WebString::fromUTF8(args[1].ToString()));
-#endif
}
void LayoutTestController::markerTextForListItem(const CppArgumentList& args,
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 96d5415..fcd1773 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -34,9 +34,6 @@
#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"
@@ -652,10 +649,6 @@ void TestShell::ResetTestController() {
event_sending_controller_->Reset();
notification_presenter_->Reset();
delegate_->Reset();
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
- if (geolocation_client_mock_.get())
- geolocation_client_mock_->resetMock();
-#endif
}
void TestShell::LoadFile(const FilePath& file) {
@@ -795,16 +788,6 @@ 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 {
diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi
index 088773f..d265a69 100644
--- a/webkit/tools/test_shell/test_shell.gypi
+++ b/webkit/tools/test_shell/test_shell.gypi
@@ -160,9 +160,6 @@
'drop_delegate.cc',
],
}],
- ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
- 'defines': [ 'ENABLE_CLIENT_BASED_GEOLOCATION=1' ]
- }],
],
},
{
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index 29d3d1f..56ade05 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -67,7 +67,6 @@ class StringPiece;
namespace WebKit {
class WebDeviceOrientationClientMock;
-class WebGeolocationClientMock;
class WebSpeechInputControllerMock;
class WebSpeechInputListener;
}
@@ -373,10 +372,6 @@ public:
WebKit::WebSpeechInputListener* listener);
WebKit::WebSpeechInputControllerMock* speech_input_controller_mock();
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
- WebKit::WebGeolocationClientMock* geolocation_client_mock();
-#endif
-
protected:
void CreateDevToolsClient(TestShellDevToolsAgent* agent);
bool Initialize(const GURL& starting_url);
@@ -461,9 +456,6 @@ private:
scoped_ptr<WebKit::WebSpeechInputControllerMock>
speech_input_controller_mock_;
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
- scoped_ptr<WebKit::WebGeolocationClientMock> geolocation_client_mock_;
-#endif
const TestParams* test_params_;
// True while a test is preparing to run
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index b791cf2..cd95bad 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -33,9 +33,6 @@
#include "third_party/WebKit/WebKit/chromium/public/WebFileError.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
-#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
-#endif
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNode.h"
@@ -657,15 +654,9 @@ WebNotificationPresenter* TestWebViewDelegate::notificationPresenter() {
return shell_->notification_presenter();
}
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
-WebKit::WebGeolocationClient* TestWebViewDelegate::geolocationClient() {
- return shell_->geolocation_client_mock();
-}
-#else
WebKit::WebGeolocationService* TestWebViewDelegate::geolocationService() {
return GetTestGeolocationService();
}
-#endif
WebKit::WebDeviceOrientationClient*
TestWebViewDelegate::deviceOrientationClient() {
@@ -1216,11 +1207,9 @@ void TestWebViewDelegate::WaitForPolicyDelegate() {
policy_delegate_should_notify_done_ = true;
}
-#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION)
void TestWebViewDelegate::SetGeolocationPermission(bool allowed) {
GetTestGeolocationService()->SetGeolocationPermission(allowed);
}
-#endif
// Private methods -----------------------------------------------------------
@@ -1342,13 +1331,11 @@ std::wstring TestWebViewDelegate::GetFrameDescription(WebFrame* webframe) {
}
}
-#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION)
TestGeolocationService* TestWebViewDelegate::GetTestGeolocationService() {
if (!test_geolocation_service_.get())
test_geolocation_service_.reset(new TestGeolocationService);
return test_geolocation_service_.get();
}
-#endif
void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
fake_rect_ = rect;
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index f5d81ad..3c7f38d 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -141,11 +141,7 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
virtual void focusAccessibilityObject(
const WebKit::WebAccessibilityObject& object);
virtual WebKit::WebNotificationPresenter* notificationPresenter();
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
- WebKit::WebGeolocationClient* geolocationClient();
-#else
virtual WebKit::WebGeolocationService* geolocationService();
-#endif
virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient();
virtual WebKit::WebSpeechInputController* speechInputController(
WebKit::WebSpeechInputListener*);
@@ -327,9 +323,7 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
edit_command_value_.clear();
}
-#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION)
void SetGeolocationPermission(bool allowed);
-#endif
void ClearContextMenuData();
@@ -385,10 +379,8 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
// Get a string suitable for dumping a frame to the console.
std::wstring GetFrameDescription(WebKit::WebFrame* webframe);
-#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION)
// Returns a TestGeolocationService owned by this delegate.
TestGeolocationService* GetTestGeolocationService();
-#endif
// Causes navigation actions just printout the intended navigation instead
// of taking you to the page. This is used for cases like mailto, where you
@@ -467,9 +459,7 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
// The mock spellchecker used in TestWebViewDelegate::spellCheck().
MockSpellCheck mock_spellcheck_;
-#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION)
scoped_ptr<TestGeolocationService> test_geolocation_service_;
-#endif
DISALLOW_COPY_AND_ASSIGN(TestWebViewDelegate);
};