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

Side by Side Diff: chrome/browser/notifications/message_center_notifications_unittest_win.cc

Issue 23636010: Notifications: Add cross-platform UMA: ShowMessageCenter, ShowSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove spurious test code. Created 7 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698