| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "base/prefs/testing_pref_service.h" | 6 #include "base/prefs/testing_pref_service.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/test/test_timeouts.h" | 8 #include "base/test/test_timeouts.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/notifications/message_center_notification_manager.h" | 10 #include "chrome/browser/notifications/message_center_notification_manager.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 run_loop()->RunUntilIdle(); | 151 run_loop()->RunUntilIdle(); |
| 152 EXPECT_FALSE(delegate()->displayed_first_run_balloon()); | 152 EXPECT_FALSE(delegate()->displayed_first_run_balloon()); |
| 153 EXPECT_FALSE(notification_manager()->FirstRunTimerIsActive()); | 153 EXPECT_FALSE(notification_manager()->FirstRunTimerIsActive()); |
| 154 EXPECT_FALSE(DidFirstRunPref()); | 154 EXPECT_FALSE(DidFirstRunPref()); |
| 155 } | 155 } |
| 156 | 156 |
| 157 TEST_F(MessageCenterNotificationManagerTest, | 157 TEST_F(MessageCenterNotificationManagerTest, |
| 158 FirstRunNotShownWithMessageCenter) { | 158 FirstRunNotShownWithMessageCenter) { |
| 159 TestingProfile profile; | 159 TestingProfile profile; |
| 160 notification_manager()->Add(GetANotification("test"), &profile); | 160 notification_manager()->Add(GetANotification("test"), &profile); |
| 161 message_center()->SetMessageCenterVisible(true); | 161 message_center()->SetVisibility(message_center::VISIBILITY_MESSAGE_CENTER); |
| 162 run_loop()->RunUntilIdle(); | 162 run_loop()->RunUntilIdle(); |
| 163 EXPECT_FALSE(notification_manager()->FirstRunTimerIsActive()); | 163 EXPECT_FALSE(notification_manager()->FirstRunTimerIsActive()); |
| 164 EXPECT_FALSE(DidFirstRunPref()); | 164 EXPECT_FALSE(DidFirstRunPref()); |
| 165 } | 165 } |
| 166 } // namespace message_center | 166 } // namespace message_center |
| OLD | NEW |