Index: components/test_runner/test_runner.cc |
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc |
index 08bb12a5162e922d95369a7ac6d361a9df30052e..6a8406d82b1e381031be7a20bd577251740f4782 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( |