Chromium Code Reviews| Index: components/test_runner/test_runner.cc |
| diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc |
| index 86185b48a8917e53e83714249e615ee18fc4d34a..e331ad2cb6517e167281c108b330ceec32ff1432 100644 |
| --- a/components/test_runner/test_runner.cc |
| +++ b/components/test_runner/test_runner.cc |
| @@ -252,6 +252,9 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> { |
| void SetXSSAuditorEnabled(bool enabled); |
| void ShowWebInspector(gin::Arguments* args); |
| void SimulateWebNotificationClick(const std::string& title, int action_index); |
| + void SimulateWebNotificationClickWithReply(const std::string& title, |
| + int action_index, |
| + const std::string& reply); |
| void SimulateWebNotificationClose(const std::string& title, bool by_user); |
| void UseUnfortunateSynchronousResizeMode(); |
| void WaitForPolicyDelegate(); |
| @@ -576,6 +579,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder( |
| .SetMethod("showWebInspector", &TestRunnerBindings::ShowWebInspector) |
| .SetMethod("simulateWebNotificationClick", |
| &TestRunnerBindings::SimulateWebNotificationClick) |
| + .SetMethod("simulateWebNotificationClickWithReply", |
| + &TestRunnerBindings::SimulateWebNotificationClickWithReply) |
| .SetMethod("simulateWebNotificationClose", |
| &TestRunnerBindings::SimulateWebNotificationClose) |
| .SetProperty("tooltipText", &TestRunnerBindings::TooltipText) |
| @@ -1357,7 +1362,16 @@ void TestRunnerBindings::SimulateWebNotificationClick(const std::string& title, |
| int action_index) { |
| if (!runner_) |
| return; |
| - runner_->SimulateWebNotificationClick(title, action_index); |
| + runner_->SimulateWebNotificationClick(title, action_index, ""); |
| +} |
| + |
| +void TestRunnerBindings::SimulateWebNotificationClickWithReply( |
|
Peter Beverloo
2016/10/11 14:28:39
Ah, yeah, this is a fine middle ground :-).
Depen
awdf
2016/10/12 14:59:45
Done.
|
| + const std::string& title, |
| + int action_index, |
| + const std::string& reply) { |
| + if (!runner_) |
| + return; |
| + runner_->SimulateWebNotificationClick(title, action_index, reply); |
| } |
| void TestRunnerBindings::SimulateWebNotificationClose(const std::string& title, |
| @@ -2686,8 +2700,9 @@ void TestRunner::SetMIDIAccessorResult(bool result) { |
| } |
| void TestRunner::SimulateWebNotificationClick(const std::string& title, |
| - int action_index) { |
| - delegate_->SimulateWebNotificationClick(title, action_index); |
| + int action_index, |
| + const std::string& reply) { |
| + delegate_->SimulateWebNotificationClick(title, action_index, reply); |
| } |
| void TestRunner::SimulateWebNotificationClose(const std::string& title, |