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

Unified Diff: chrome/browser/notifications/notification_browsertest.cc

Issue 802753002: Revert of "Call the Close() event on a Notification when it's being replaced." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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: chrome/browser/notifications/notification_browsertest.cc
diff --git a/chrome/browser/notifications/notification_browsertest.cc b/chrome/browser/notifications/notification_browsertest.cc
index 7f9a3f21427cbd05acd21e2ff182632da0a7dcec..36262e5449f9ec1a2e4ab138826af39766f8ebba 100644
--- a/chrome/browser/notifications/notification_browsertest.cc
+++ b/chrome/browser/notifications/notification_browsertest.cc
@@ -765,15 +765,15 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestNotificationReplacement) {
ui_test_utils::NavigateToURL(browser(), GetTestPageURL());
- std::string original_result = CreateNotification(
+ std::string result = CreateNotification(
browser(), true, "abc.png", "Title1", "Body1", "chat");
- EXPECT_NE("-1", original_result);
+ EXPECT_NE("-1", result);
ASSERT_EQ(1, GetNotificationCount());
- std::string replaced_result = CreateNotification(
+ result = CreateNotification(
browser(), false, "no_such_file.png", "Title2", "Body2", "chat");
- EXPECT_NE("-1", replaced_result);
+ EXPECT_NE("-1", result);
ASSERT_EQ(1, GetNotificationCount());
message_center::NotificationList::Notifications notifications =
@@ -781,15 +781,6 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestNotificationReplacement) {
EXPECT_EQ(base::ASCIIToUTF16("Title2"), (*notifications.rbegin())->title());
EXPECT_EQ(base::ASCIIToUTF16("Body2"),
(*notifications.rbegin())->message());
-
- std::string result;
- bool success = content::ExecuteScriptAndExtractString(
- browser()->tab_strip_model()->GetActiveWebContents(),
- std::string("hasBeenClosed(") + original_result + ");",
- &result);
-
- EXPECT_TRUE(success);
- EXPECT_EQ(result, "true");
}
IN_PROC_BROWSER_TEST_F(NotificationsTest, TestLastUsage) {

Powered by Google App Engine
This is Rietveld 408576698