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

Side by Side Diff: chrome/browser/background/background_contents_service_unittest.cc

Issue 1334363002: [Eraser] First pass at removing the notification center panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: peter comments Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 message_center::MessageCenter::Initialize(); 184 message_center::MessageCenter::Initialize();
185 #endif 185 #endif
186 profile_manager_.reset(new TestingProfileManager( 186 profile_manager_.reset(new TestingProfileManager(
187 TestingBrowserProcess::GetGlobal())); 187 TestingBrowserProcess::GetGlobal()));
188 ASSERT_TRUE(profile_manager_->SetUp()); 188 ASSERT_TRUE(profile_manager_->SetUp());
189 MessageCenterNotificationManager* manager = 189 MessageCenterNotificationManager* manager =
190 static_cast<MessageCenterNotificationManager*>( 190 static_cast<MessageCenterNotificationManager*>(
191 g_browser_process->notification_ui_manager()); 191 g_browser_process->notification_ui_manager());
192 manager->SetMessageCenterTrayDelegateForTest( 192 manager->SetMessageCenterTrayDelegateForTest(
193 new message_center::FakeMessageCenterTrayDelegate( 193 new message_center::FakeMessageCenterTrayDelegate(
194 message_center::MessageCenter::Get(), base::Closure())); 194 message_center::MessageCenter::Get()));
195 } 195 }
196 196
197 void TearDown() override { 197 void TearDown() override {
198 g_browser_process->notification_ui_manager()->CancelAll(); 198 g_browser_process->notification_ui_manager()->CancelAll();
199 profile_manager_.reset(); 199 profile_manager_.reset();
200 #if !defined(OS_CHROMEOS) 200 #if !defined(OS_CHROMEOS)
201 message_center::MessageCenter::Shutdown(); 201 message_center::MessageCenter::Shutdown();
202 #endif 202 #endif
203 BrowserWithTestWindowTest::TearDown(); 203 BrowserWithTestWindowTest::TearDown();
204 } 204 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 CreateCrashNotification(extension); 390 CreateCrashNotification(extension);
391 CreateCrashNotification(extension); 391 CreateCrashNotification(extension);
392 392
393 message_center::MessageCenter* message_center = 393 message_center::MessageCenter* message_center =
394 message_center::MessageCenter::Get(); 394 message_center::MessageCenter::Get();
395 message_center::NotificationList::Notifications notifications = 395 message_center::NotificationList::Notifications notifications =
396 message_center->GetVisibleNotifications(); 396 message_center->GetVisibleNotifications();
397 ASSERT_EQ(1u, notifications.size()); 397 ASSERT_EQ(1u, notifications.size());
398 } 398 }
399 #endif 399 #endif
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/notifications/message_center_notification_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698