| Index: components/test_runner/test_runner.cc
|
| diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
|
| index 3b5bc578e6d2d4164abc4e3cd19c21c4cb6bd123..1ed469d551e21f6cea58896f21efb6914358ee35 100644
|
| --- a/components/test_runner/test_runner.cc
|
| +++ b/components/test_runner/test_runner.cc
|
| @@ -315,6 +315,8 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
|
| void SetCustomTextOutput(const std::string& output);
|
| void SetViewSourceForFrame(const std::string& name, bool enabled);
|
| void SetBluetoothMockDataSet(const std::string& dataset_name);
|
| + void SetBluetoothFakeAdapter(const std::string& adapter_name,
|
| + v8::Local<v8::Function> callback);
|
| void SetBluetoothManualChooser();
|
| void GetBluetoothManualChooserEvents(v8::Local<v8::Function> callback);
|
| void SendBluetoothManualChooserEvent(const std::string& event,
|
| @@ -601,6 +603,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
|
| // https://webbluetoothcg.github.io/web-bluetooth/tests/.
|
| .SetMethod("setBluetoothMockDataSet",
|
| &TestRunnerBindings::SetBluetoothMockDataSet)
|
| + .SetMethod("setBluetoothFakeAdapter",
|
| + &TestRunnerBindings::SetBluetoothFakeAdapter)
|
| .SetMethod("setBluetoothManualChooser",
|
| &TestRunnerBindings::SetBluetoothManualChooser)
|
| .SetMethod("getBluetoothManualChooserEvents",
|
| @@ -1380,6 +1384,13 @@ void TestRunnerBindings::SetBluetoothMockDataSet(const std::string& name) {
|
| runner_->SetBluetoothMockDataSet(name);
|
| }
|
|
|
| +void TestRunnerBindings::SetBluetoothFakeAdapter(
|
| + const std::string& adapter_name,
|
| + v8::Local<v8::Function> callback) {
|
| + if (runner_)
|
| + runner_->SetBluetoothFakeAdapter(adapter_name, callback);
|
| +}
|
| +
|
| void TestRunnerBindings::SetBluetoothManualChooser() {
|
| if (runner_)
|
| runner_->SetBluetoothManualChooser();
|
| @@ -2882,6 +2893,15 @@ void TestRunner::SetBluetoothMockDataSet(const std::string& name) {
|
| delegate_->SetBluetoothMockDataSet(name);
|
| }
|
|
|
| +void TestRunner::SetBluetoothFakeAdapter(const std::string& adapter_name,
|
| + v8::Local<v8::Function> callback) {
|
| + scoped_ptr<InvokeCallbackTask> task(new InvokeCallbackTask(this, callback));
|
| + delegate_->SetBluetoothFakeAdapter(
|
| + adapter_name,
|
| + base::Bind(&TestRunner::InvokeCallback,
|
| + weak_factory_.GetWeakPtr(), base::Passed(&task)));
|
| +}
|
| +
|
| void TestRunner::SetBluetoothManualChooser() {
|
| delegate_->SetBluetoothManualChooser();
|
| }
|
|
|