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

Unified Diff: Source/testing/runner/TestRunner.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/TestRunner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/testing/runner/TestRunner.cpp
diff --git a/Source/testing/runner/TestRunner.cpp b/Source/testing/runner/TestRunner.cpp
index 550abc9573ce6521a49a78f3efe366b20a710aeb..01b9280632d95c9c1ca570b87b1cc2f99a9aa2bf 100644
--- a/Source/testing/runner/TestRunner.cpp
+++ b/Source/testing/runner/TestRunner.cpp
@@ -284,6 +284,7 @@ TestRunner::TestRunner(TestInterfaces* interfaces)
#if ENABLE_NOTIFICATIONS
bindMethod("grantWebNotificationPermission", &TestRunner::grantWebNotificationPermission);
bindMethod("simulateLegacyWebNotificationClick", &TestRunner::simulateLegacyWebNotificationClick);
+ bindMethod("cancelAllActiveNotifications", &TestRunner::cancelAllActiveNotifications);
#endif
bindMethod("addMockSpeechInputResult", &TestRunner::addMockSpeechInputResult);
bindMethod("setMockSpeechInputDumpRect", &TestRunner::setMockSpeechInputDumpRect);
@@ -1866,6 +1867,12 @@ void TestRunner::simulateLegacyWebNotificationClick(const CppArgumentList& argum
}
result->set(m_notificationPresenter->simulateClick(WebString::fromUTF8(arguments[0].toString())));
}
+
+void TestRunner::cancelAllActiveNotifications(const CppArgumentList& arguments, CppVariant* result)
+{
+ m_notificationPresenter->cancelAllActiveNotifications();
+ result->set(true);
+}
#endif
void TestRunner::addMockSpeechInputResult(const CppArgumentList& arguments, CppVariant* result)
« no previous file with comments | « Source/testing/runner/TestRunner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698