| Index: components/test_runner/test_runner.cc
|
| diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
|
| index 16799fcefa6c56e49128d7043d0e2db551b498d8..7dc3e932fe7f3fe752ce9af8ed1270ab3c8495ce 100644
|
| --- a/components/test_runner/test_runner.cc
|
| +++ b/components/test_runner/test_runner.cc
|
| @@ -296,6 +296,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
|
| void SetPOSIXLocale(const std::string& locale);
|
| void SetMIDIAccessorResult(bool result);
|
| void SimulateWebNotificationClick(const std::string& title, int action_index);
|
| + void SimulateWebNotificationClose(const std::string& title, bool by_user);
|
| void AddMockSpeechRecognitionResult(const std::string& transcript,
|
| double confidence);
|
| void SetMockSpeechRecognitionError(const std::string& error,
|
| @@ -572,6 +573,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
|
| &TestRunnerBindings::SetMIDIAccessorResult)
|
| .SetMethod("simulateWebNotificationClick",
|
| &TestRunnerBindings::SimulateWebNotificationClick)
|
| + .SetMethod("simulateWebNotificationClose",
|
| + &TestRunnerBindings::SimulateWebNotificationClose)
|
| .SetMethod("addMockSpeechRecognitionResult",
|
| &TestRunnerBindings::AddMockSpeechRecognitionResult)
|
| .SetMethod("setMockSpeechRecognitionError",
|
| @@ -1420,6 +1423,13 @@ void TestRunnerBindings::SimulateWebNotificationClick(const std::string& title,
|
| runner_->SimulateWebNotificationClick(title, action_index);
|
| }
|
|
|
| +void TestRunnerBindings::SimulateWebNotificationClose(const std::string& title,
|
| + bool by_user) {
|
| + if (!runner_)
|
| + return;
|
| + runner_->SimulateWebNotificationClose(title, by_user);
|
| +}
|
| +
|
| void TestRunnerBindings::AddMockSpeechRecognitionResult(
|
| const std::string& transcript, double confidence) {
|
| if (runner_)
|
| @@ -2988,6 +2998,11 @@ void TestRunner::SimulateWebNotificationClick(const std::string& title,
|
| delegate_->SimulateWebNotificationClick(title, action_index);
|
| }
|
|
|
| +void TestRunner::SimulateWebNotificationClose(const std::string& title,
|
| + bool by_user) {
|
| + delegate_->SimulateWebNotificationClose(title, by_user);
|
| +}
|
| +
|
| void TestRunner::AddMockSpeechRecognitionResult(const std::string& transcript,
|
| double confidence) {
|
| proxy_->GetSpeechRecognizerMock()->AddMockResult(
|
|
|