| Index: content/shell/renderer/test_runner/test_runner.cc
|
| diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
|
| index 04fffe85c8291b64db05cbced6c1e4c75b6069cd..25e568951ec9b6f57b3c52d3682998e48656d6a3 100644
|
| --- a/content/shell/renderer/test_runner/test_runner.cc
|
| +++ b/content/shell/renderer/test_runner/test_runner.cc
|
| @@ -29,6 +29,7 @@
|
| #include "third_party/WebKit/public/platform/WebDeviceOrientationData.h"
|
| #include "third_party/WebKit/public/platform/WebLocalCredential.h"
|
| #include "third_party/WebKit/public/platform/WebPoint.h"
|
| +#include "third_party/WebKit/public/platform/WebServiceWorkerRegistration.h"
|
| #include "third_party/WebKit/public/platform/WebURLResponse.h"
|
| #include "third_party/WebKit/public/web/WebArrayBuffer.h"
|
| #include "third_party/WebKit/public/web/WebArrayBufferConverter.h"
|
| @@ -299,6 +300,9 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
|
| void SetPushMessagingPermission(const std::string& origin, bool allowed);
|
| void ClearPushMessagingPermissions();
|
| void SetBluetoothMockDataSet(const std::string& dataset_name);
|
| + void SetGeofencingMockProvider(bool service_available);
|
| + void ClearGeofencingMockProvider();
|
| + void SetGeofencingMockPosition(double latitude, double longitude);
|
|
|
| std::string PlatformName();
|
| std::string TooltipText();
|
| @@ -553,6 +557,12 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
|
| &TestRunnerBindings::SetBluetoothMockDataSet)
|
| .SetMethod("forceNextWebGLContextCreationToFail",
|
| &TestRunnerBindings::ForceNextWebGLContextCreationToFail)
|
| + .SetMethod("setGeofencingMockProvider",
|
| + &TestRunnerBindings::SetGeofencingMockProvider)
|
| + .SetMethod("clearGeofencingMockProvider",
|
| + &TestRunnerBindings::ClearGeofencingMockProvider)
|
| + .SetMethod("setGeofencingMockPosition",
|
| + &TestRunnerBindings::SetGeofencingMockPosition)
|
|
|
| // Properties.
|
| .SetProperty("platformName", &TestRunnerBindings::PlatformName)
|
| @@ -1433,6 +1443,22 @@ void TestRunnerBindings::ClearPushMessagingPermissions() {
|
| runner_->ClearPushMessagingPermissions();
|
| }
|
|
|
| +void TestRunnerBindings::SetGeofencingMockProvider(bool service_available) {
|
| + if (runner_)
|
| + runner_->SetGeofencingMockProvider(service_available);
|
| +}
|
| +
|
| +void TestRunnerBindings::ClearGeofencingMockProvider() {
|
| + if (runner_)
|
| + runner_->ClearGeofencingMockProvider();
|
| +}
|
| +
|
| +void TestRunnerBindings::SetGeofencingMockPosition(double latitude,
|
| + double longitude) {
|
| + if (runner_)
|
| + runner_->SetGeofencingMockPosition(latitude, longitude);
|
| +}
|
| +
|
| std::string TestRunnerBindings::PlatformName() {
|
| if (runner_)
|
| return runner_->platform_name_;
|
| @@ -1627,6 +1653,7 @@ void TestRunner::Reset() {
|
| delegate_->DeleteAllCookies();
|
| delegate_->ResetScreenOrientation();
|
| delegate_->SetBluetoothMockDataSet("");
|
| + delegate_->ClearGeofencingMockProvider();
|
| ResetBatteryStatus();
|
| ResetDeviceLight();
|
| }
|
| @@ -2763,6 +2790,18 @@ void TestRunner::SetBluetoothMockDataSet(const std::string& name) {
|
| delegate_->SetBluetoothMockDataSet(name);
|
| }
|
|
|
| +void TestRunner::SetGeofencingMockProvider(bool service_available) {
|
| + delegate_->SetGeofencingMockProvider(service_available);
|
| +}
|
| +
|
| +void TestRunner::ClearGeofencingMockProvider() {
|
| + delegate_->ClearGeofencingMockProvider();
|
| +}
|
| +
|
| +void TestRunner::SetGeofencingMockPosition(double latitude, double longitude) {
|
| + delegate_->SetGeofencingMockPosition(latitude, longitude);
|
| +}
|
| +
|
| void TestRunner::SetPOSIXLocale(const std::string& locale) {
|
| delegate_->SetLocale(locale);
|
| }
|
|
|