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

Unified Diff: content/shell/browser/layout_test/layout_test_notification_manager.cc

Issue 1262893006: Enable testing NotificationEvent.action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@click_actions
Patch Set: Remove check Created 5 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
Index: content/shell/browser/layout_test/layout_test_notification_manager.cc
diff --git a/content/shell/browser/layout_test/layout_test_notification_manager.cc b/content/shell/browser/layout_test/layout_test_notification_manager.cc
index 1e405add13afad290655388e3f551b99d5029087..3a0433b380db744a5acc548df565a4bda247303f 100644
--- a/content/shell/browser/layout_test/layout_test_notification_manager.cc
+++ b/content/shell/browser/layout_test/layout_test_notification_manager.cc
@@ -106,12 +106,14 @@ bool LayoutTestNotificationManager::GetDisplayedPersistentNotifications(
return false;
}
-void LayoutTestNotificationManager::SimulateClick(const std::string& title) {
+void LayoutTestNotificationManager::SimulateClick(const std::string& title,
+ int action_index) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
// First check for page-notifications with the given title.
const auto& page_iterator = page_notifications_.find(title);
if (page_iterator != page_notifications_.end()) {
+ // TODO(johnme): Pass action_index once it's supported.
page_iterator->second->NotificationClick();
return;
}
@@ -127,7 +129,7 @@ void LayoutTestNotificationManager::SimulateClick(const std::string& title) {
notification.browser_context,
notification.persistent_id,
notification.origin,
- -1 /* action_index */,
+ action_index,
base::Bind(&OnEventDispatchComplete));
}

Powered by Google App Engine
This is Rietveld 408576698