Index: components/test_runner/test_runner.cc |
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc |
index 1f156c68436a6441793b7a91523f0b2dc1b5de53..4826862c15c2bdf1cc84989398044020e4c70352 100644 |
--- a/components/test_runner/test_runner.cc |
+++ b/components/test_runner/test_runner.cc |
@@ -274,6 +274,8 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> { |
void SetPOSIXLocale(const std::string& locale); |
void SetMIDIAccessorResult(bool result); |
void SimulateWebNotificationClick(const std::string& title); |
+ void SimulateWebNotificationActionClick(const std::string& title, |
Peter Beverloo
2015/08/04 21:08:33
Can we overload methods here? We shouldn't have tw
johnme
2015/08/05 13:51:27
Done, using gin::Arguments*.
|
+ int action_index); |
void AddMockSpeechRecognitionResult(const std::string& transcript, |
double confidence); |
void SetMockSpeechRecognitionError(const std::string& error, |
@@ -542,6 +544,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder( |
&TestRunnerBindings::SetMIDIAccessorResult) |
.SetMethod("simulateWebNotificationClick", |
&TestRunnerBindings::SimulateWebNotificationClick) |
+ .SetMethod("simulateWebNotificationActionClick", |
+ &TestRunnerBindings::SimulateWebNotificationActionClick) |
.SetMethod("addMockSpeechRecognitionResult", |
&TestRunnerBindings::AddMockSpeechRecognitionResult) |
.SetMethod("setMockSpeechRecognitionError", |
@@ -1346,7 +1350,13 @@ void TestRunnerBindings::SetMIDIAccessorResult(bool result) { |
void TestRunnerBindings::SimulateWebNotificationClick( |
const std::string& title) { |
if (runner_) |
- runner_->SimulateWebNotificationClick(title); |
+ runner_->SimulateWebNotificationClick(title, -1 /* action_index */); |
+} |
+ |
+void TestRunnerBindings::SimulateWebNotificationActionClick( |
+ const std::string& title, int action_index) { |
+ if (runner_) |
+ runner_->SimulateWebNotificationClick(title, action_index); |
} |
void TestRunnerBindings::AddMockSpeechRecognitionResult( |
@@ -2854,8 +2864,9 @@ void TestRunner::SetMIDIAccessorResult(bool result) { |
midi_accessor_result_ = result; |
} |
-void TestRunner::SimulateWebNotificationClick(const std::string& title) { |
- delegate_->SimulateWebNotificationClick(title); |
+void TestRunner::SimulateWebNotificationClick(const std::string& title, |
+ int action_index) { |
+ delegate_->SimulateWebNotificationClick(title, action_index); |
} |
void TestRunner::AddMockSpeechRecognitionResult(const std::string& transcript, |