Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 659043003: Implement the ability to layout test Web Worker-based Notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/shell/renderer/test_runner/test_runner.cc
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index a477f401b7e56e32ca66e4afaf61193a0f9f6e90..75e91f32b3f0ee1e771b54f7655fa50616aaa3db 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -273,7 +273,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void SetMIDISysexPermission(bool value);
void GrantWebNotificationPermission(gin::Arguments* args);
void ClearWebNotificationPermissions();
- bool SimulateWebNotificationClick(const std::string& value);
+ void SimulateWebNotificationClick(const std::string& title);
void AddMockSpeechRecognitionResult(const std::string& transcript,
double confidence);
void SetMockSpeechRecognitionError(const std::string& error,
@@ -1307,11 +1307,10 @@ void TestRunnerBindings::ClearWebNotificationPermissions() {
runner_->ClearWebNotificationPermissions();
}
-bool TestRunnerBindings::SimulateWebNotificationClick(
- const std::string& value) {
+void TestRunnerBindings::SimulateWebNotificationClick(
+ const std::string& title) {
if (runner_)
- return runner_->SimulateWebNotificationClick(value);
- return false;
+ runner_->SimulateWebNotificationClick(title);
}
void TestRunnerBindings::AddMockSpeechRecognitionResult(
@@ -2753,8 +2752,12 @@ void TestRunner::ClearWebNotificationPermissions() {
delegate_->ClearWebNotificationPermissions();
}
-bool TestRunner::SimulateWebNotificationClick(const std::string& value) {
- return notification_presenter_->SimulateClick(value);
+void TestRunner::SimulateWebNotificationClick(const std::string& title) {
+ delegate_->SimulateWebNotificationClick(title);
+
+ // TODO(peter): Remove this call once Web Notifications switch away from the
+ // WebFrame-based code path.
+ notification_presenter_->SimulateClick(title);
}
void TestRunner::AddMockSpeechRecognitionResult(const std::string& transcript,
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | content/shell/renderer/test_runner/web_test_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698