Index: chrome/browser/chromeos/net/tether_notification_presenter_unittest.cc |
diff --git a/chrome/browser/chromeos/net/tether_notification_presenter_unittest.cc b/chrome/browser/chromeos/net/tether_notification_presenter_unittest.cc |
index beeeb53a214c2282d24f5bfdcb1e6cc8a98d8dba..0f4ad413537ca19d6ad3eb0244f9aad6a0d05346 100644 |
--- a/chrome/browser/chromeos/net/tether_notification_presenter_unittest.cc |
+++ b/chrome/browser/chromeos/net/tether_notification_presenter_unittest.cc |
@@ -28,10 +28,6 @@ class TestMessageCenter : public message_center::FakeMessageCenter { |
~TestMessageCenter() override {} |
void NotifyNotificationTapped(const std::string& notification_id) { |
- // Simulate the notification being removed, since a tap on the notification |
- // removes that notification. |
- RemoveNotification(notification_id, true /* by_user */); |
- |
for (auto& observer : observer_list_) { |
observer.OnNotificationClicked(notification_id); |
} |
@@ -39,10 +35,6 @@ class TestMessageCenter : public message_center::FakeMessageCenter { |
void NotifyNotificationButtonTapped(const std::string& notification_id, |
int button_index) { |
- // Simulate the notification being removed, since a tap on a notification |
- // button removes that notification. |
- RemoveNotification(notification_id, true /* by_user */); |
- |
for (auto& observer : observer_list_) { |
observer.OnNotificationButtonClicked(notification_id, button_index); |
} |
@@ -253,6 +245,9 @@ TEST_F(TetherNotificationPresenterTest, |
// Tap the notification. |
test_message_center_->NotifyNotificationTapped(GetActiveHostNotificationId()); |
VerifySettingsOpened(); |
+ EXPECT_FALSE(test_message_center_->FindVisibleNotificationById( |
+ GetActiveHostNotificationId())); |
+ EXPECT_EQ(0u, test_message_center_->GetNumNotifications()); |
} |
TEST_F(TetherNotificationPresenterTest, TestSetupRequiredNotification) { |
@@ -308,6 +303,9 @@ TEST_F(TetherNotificationPresenterTest, |
test_message_center_->NotifyNotificationTapped( |
GetPotentialHotspotNotificationId()); |
VerifySettingsOpened(); |
+ EXPECT_FALSE(test_message_center_->FindVisibleNotificationById( |
+ GetPotentialHotspotNotificationId())); |
+ EXPECT_EQ(0u, test_message_center_->GetNumNotifications()); |
} |
TEST_F(TetherNotificationPresenterTest, |
@@ -325,6 +323,9 @@ TEST_F(TetherNotificationPresenterTest, |
// Tap the notification's button. |
test_message_center_->NotifyNotificationButtonTapped( |
GetPotentialHotspotNotificationId(), 0 /* button_index */); |
+ EXPECT_FALSE(test_message_center_->FindVisibleNotificationById( |
+ GetPotentialHotspotNotificationId())); |
+ EXPECT_EQ(0u, test_message_center_->GetNumNotifications()); |
EXPECT_EQ(test_device_.GetDeviceId(), |
test_network_connect_->network_id_to_connect()); |
@@ -365,6 +366,9 @@ TEST_F(TetherNotificationPresenterTest, |
test_message_center_->NotifyNotificationTapped( |
GetPotentialHotspotNotificationId()); |
VerifySettingsOpened(); |
+ EXPECT_FALSE(test_message_center_->FindVisibleNotificationById( |
+ GetPotentialHotspotNotificationId())); |
+ EXPECT_EQ(0u, test_message_center_->GetNumNotifications()); |
} |
TEST_F(TetherNotificationPresenterTest, |