Index: chrome/browser/background/background_contents_service_unittest.cc |
diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc |
index 7389d9e5c1b6c72815daed894a3eebd6953a12d3..83aa60d0d387a305dfabf19801366938a87f373f 100644 |
--- a/chrome/browser/background/background_contents_service_unittest.cc |
+++ b/chrome/browser/background/background_contents_service_unittest.cc |
@@ -131,8 +131,6 @@ class NotificationWaiter : public message_center::MessageCenterObserver { |
DCHECK(!run_loop_.running()); |
message_center::MessageCenter* message_center = |
message_center::MessageCenter::Get(); |
- if (message_center->HasNotification(target_id_)) |
- return; |
message_center->AddObserver(this); |
run_loop_.Run(); |
@@ -146,6 +144,11 @@ class NotificationWaiter : public message_center::MessageCenterObserver { |
if (notification_id == target_id_) |
run_loop_.Quit(); |
} |
+ virtual void OnNotificationUpdated( |
Andrew T Wilson (Slow)
2014/05/19 14:02:27
blank line above this
dewittj
2014/05/20 18:18:22
Done.
|
+ const std::string& notification_id) OVERRIDE { |
+ if (notification_id == target_id_) |
+ run_loop_.Quit(); |
+ } |
std::string target_id_; |
base::RunLoop run_loop_; |
@@ -366,4 +369,13 @@ TEST_F(BackgroundContentsServiceNotificationTest, TestShowBalloonNoIcon) { |
const Notification* notification = CreateCrashNotification(extension); |
EXPECT_FALSE(notification->icon().IsEmpty()); |
} |
+ |
+TEST_F(BackgroundContentsServiceNotificationTest, TestShowTwoBalloons) { |
+ TestingProfile profile; |
+ scoped_refptr<extensions::Extension> extension = |
+ extension_test_util::LoadManifest("app", "manifest.json"); |
+ ASSERT_TRUE(extension.get()); |
+ CreateCrashNotification(extension); |
+ CreateCrashNotification(extension); |
Andrew T Wilson (Slow)
2014/05/19 14:02:27
Do we need to check that there's only one extensio
dewittj
2014/05/20 18:18:22
Done.
|
+} |
#endif |