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

Unified Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 702593002: bluetooth: Initial simple mock content::WebBluetoothImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ Created 6 years, 1 month 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: 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 75e91f32b3f0ee1e771b54f7655fa50616aaa3db..3eeda2e6db4cfc9567086cfe6967df00ce69902d 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -297,6 +297,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void SetMockPushClientSuccess(const std::string& endpoint,
const std::string& registration_id);
void SetMockPushClientError(const std::string& message);
+ void SetBluetoothMockDataSet(const std::string& dataset_name);
std::string PlatformName();
std::string TooltipText();
@@ -541,6 +542,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
&TestRunnerBindings::SetMockPushClientSuccess)
.SetMethod("setMockPushClientError",
&TestRunnerBindings::SetMockPushClientError)
+ .SetMethod("setBluetoothMockDataSet",
+ &TestRunnerBindings::SetBluetoothMockDataSet)
// Properties.
.SetProperty("platformName", &TestRunnerBindings::PlatformName)
@@ -1276,6 +1279,11 @@ void TestRunnerBindings::SetColorProfile(
runner_->SetColorProfile(name, callback);
}
+void TestRunnerBindings::SetBluetoothMockDataSet(const std::string& name) {
+ if (runner_)
+ runner_->SetBluetoothMockDataSet(name);
+}
+
void TestRunnerBindings::SetPOSIXLocale(const std::string& locale) {
if (runner_)
runner_->SetPOSIXLocale(locale);
@@ -1595,6 +1603,7 @@ void TestRunner::Reset() {
delegate_->DisableAutoResizeMode(WebSize());
delegate_->DeleteAllCookies();
delegate_->ResetScreenOrientation();
+ delegate_->SetBluetoothMockDataSet("");
ResetBatteryStatus();
ResetDeviceLight();
}
@@ -2730,6 +2739,10 @@ void TestRunner::SetColorProfile(const std::string& name,
delegate_->PostTask(new InvokeCallbackTask(this, callback));
}
+void TestRunner::SetBluetoothMockDataSet(const std::string& name) {
+ delegate_->SetBluetoothMockDataSet(name);
+}
+
void TestRunner::SetPOSIXLocale(const std::string& locale) {
delegate_->SetLocale(locale);
}
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | content/shell/renderer/test_runner/web_test_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698