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

Side by Side Diff: chrome/browser/chromeos/status/data_promo_notification_unittest.cc

Issue 1425093004: Revert of This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Created 5 years, 1 month 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "chrome/browser/chromeos/status/data_promo_notification.h" 5 #include "chrome/browser/chromeos/status/data_promo_notification.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" 9 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
10 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" 10 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 user_manager_enabler_.reset(); 79 user_manager_enabler_.reset();
80 data_promo_notification_.reset(); 80 data_promo_notification_.reset();
81 NetworkHandler::Shutdown(); 81 NetworkHandler::Shutdown();
82 DBusThreadManager::Shutdown(); 82 DBusThreadManager::Shutdown();
83 testing::Test::TearDown(); 83 testing::Test::TearDown();
84 } 84 }
85 85
86 protected: 86 protected:
87 void SetupUser() { 87 void SetupUser() {
88 scoped_ptr<FakeChromeUserManager> user_manager(new FakeChromeUserManager()); 88 scoped_ptr<FakeChromeUserManager> user_manager(new FakeChromeUserManager());
89 const AccountId test_account_id(AccountId::FromUserEmail(kTestUserName)); 89 user_manager->AddUser(kTestUserName);
90 user_manager->AddUser(test_account_id); 90 user_manager->LoginUser(kTestUserName);
91 user_manager->LoginUser(test_account_id);
92 user_manager_enabler_.reset( 91 user_manager_enabler_.reset(
93 new ScopedUserManagerEnabler(user_manager.release())); 92 new ScopedUserManagerEnabler(user_manager.release()));
94 93
95 profile_manager_.reset( 94 profile_manager_.reset(
96 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); 95 new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
97 ASSERT_TRUE(profile_manager_->SetUp()); 96 ASSERT_TRUE(profile_manager_->SetUp());
98 profile_manager_->SetLoggedIn(true); 97 profile_manager_->SetLoggedIn(true);
99 ASSERT_TRUE(user_manager::UserManager::Get()->GetPrimaryUser()); 98 ASSERT_TRUE(user_manager::UserManager::Get()->GetPrimaryUser());
100 99
101 LoginState::Initialize(); 100 LoginState::Initialize();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 151
153 ui::NetworkConnect::Get()->ConnectToNetwork(kCellularServicePath); 152 ui::NetworkConnect::Get()->ConnectToNetwork(kCellularServicePath);
154 base::RunLoop().RunUntilIdle(); 153 base::RunLoop().RunUntilIdle();
155 // Connecting to cellular network (which here makes it the default network) 154 // Connecting to cellular network (which here makes it the default network)
156 // should trigger the Data Saver notification. 155 // should trigger the Data Saver notification.
157 EXPECT_TRUE(message_center->FindVisibleNotificationById(kNotificationId)); 156 EXPECT_TRUE(message_center->FindVisibleNotificationById(kNotificationId));
158 } 157 }
159 158
160 } // namespace test 159 } // namespace test
161 } // namespace chromeos 160 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698