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

Unified Diff: Source/testing/runner/NotificationPresenter.cpp

Issue 22852029: Add testRunner.cancelAllActiveNotifications to close all active notifications. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rename Created 7 years, 4 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
« no previous file with comments | « Source/testing/runner/NotificationPresenter.h ('k') | Source/testing/runner/TestRunner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/testing/runner/NotificationPresenter.cpp
diff --git a/Source/testing/runner/NotificationPresenter.cpp b/Source/testing/runner/NotificationPresenter.cpp
index f8816e703dbc32fa4ca7c0a73f897e532dfa1327..832f26e41c7f6588a3277cd15b52c6ca75f82aaa 100644
--- a/Source/testing/runner/NotificationPresenter.cpp
+++ b/Source/testing/runner/NotificationPresenter.cpp
@@ -90,6 +90,14 @@ bool NotificationPresenter::simulateClick(const WebString& title)
return true;
}
+void NotificationPresenter::cancelAllActiveNotifications()
+{
+ while (!m_activeNotifications.empty()) {
+ const WebNotification& notification = m_activeNotifications.begin()->second;
+ cancel(notification);
+ }
+}
+
// The output from all these methods matches what DumpRenderTree produces.
bool NotificationPresenter::show(const WebNotification& notification)
{
« no previous file with comments | « Source/testing/runner/NotificationPresenter.h ('k') | Source/testing/runner/TestRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698