Index: jingle/notifier/listener/non_blocking_push_client_unittest.cc |
diff --git a/jingle/notifier/listener/non_blocking_push_client_unittest.cc b/jingle/notifier/listener/non_blocking_push_client_unittest.cc |
index c4152259a75f05af8fd8f6042faaa8ec813f8016..f9e028268ef4eb961164ed764af98b7a50eaba0f 100644 |
--- a/jingle/notifier/listener/non_blocking_push_client_unittest.cc |
+++ b/jingle/notifier/listener/non_blocking_push_client_unittest.cc |
@@ -115,13 +115,17 @@ TEST_F(NonBlockingPushClientTest, SendNotification) { |
// Make sure notification state changes get propagated back to the |
// parent. |
TEST_F(NonBlockingPushClientTest, NotificationStateChange) { |
- EXPECT_FALSE(fake_observer_.notifications_enabled()); |
- fake_push_client_->SimulateNotificationStateChange(true); |
+ EXPECT_EQ(DEFAULT_NOTIFICATION_ERROR, |
+ fake_observer_.last_notifications_disabled_reason()); |
+ fake_push_client_->EnableNotifications(); |
message_loop_.RunAllPending(); |
- EXPECT_TRUE(fake_observer_.notifications_enabled()); |
- fake_push_client_->SimulateNotificationStateChange(false); |
+ EXPECT_EQ(NO_NOTIFICATION_ERROR, |
+ fake_observer_.last_notifications_disabled_reason()); |
+ fake_push_client_->DisableNotifications( |
+ NOTIFICATION_CREDENTIALS_REJECTED); |
message_loop_.RunAllPending(); |
- EXPECT_FALSE(fake_observer_.notifications_enabled()); |
+ EXPECT_EQ(NOTIFICATION_CREDENTIALS_REJECTED, |
+ fake_observer_.last_notifications_disabled_reason()); |
} |
// Make sure incoming notifications get propagated back to the parent. |