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

Side by Side Diff: chrome/browser/ui/ash/session_state_delegate_chromeos_unittest.cc

Issue 857433003: Update {virtual,override,final} to follow C++11 style chrome/browser/ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase Created 5 years, 11 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 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 "chrome/browser/ui/ash/session_state_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 29 matching lines...) Expand all
40 user_manager::UserManager::Get()).release(); 40 user_manager::UserManager::Get()).release();
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 class SessionStateDelegateChromeOSTest : public testing::Test { 45 class SessionStateDelegateChromeOSTest : public testing::Test {
46 protected: 46 protected:
47 SessionStateDelegateChromeOSTest() : user_manager_(NULL) { 47 SessionStateDelegateChromeOSTest() : user_manager_(NULL) {
48 } 48 }
49 49
50 virtual ~SessionStateDelegateChromeOSTest() { 50 ~SessionStateDelegateChromeOSTest() override {}
51 }
52 51
53 virtual void SetUp() override { 52 void SetUp() override {
54 // Initialize the UserManager singleton to a fresh FakeUserManager instance. 53 // Initialize the UserManager singleton to a fresh FakeUserManager instance.
55 user_manager_ = new chromeos::FakeUserManager; 54 user_manager_ = new chromeos::FakeUserManager;
56 user_manager_enabler_.reset( 55 user_manager_enabler_.reset(
57 new chromeos::ScopedUserManagerEnabler(user_manager_)); 56 new chromeos::ScopedUserManagerEnabler(user_manager_));
58 57
59 // Create our SessionStateDelegate to experiment with. 58 // Create our SessionStateDelegate to experiment with.
60 session_state_delegate_.reset(new SessionStateDelegateChromeos()); 59 session_state_delegate_.reset(new SessionStateDelegateChromeos());
61 testing::Test::SetUp(); 60 testing::Test::SetUp();
62 } 61 }
63 62
64 virtual void TearDown() override { 63 void TearDown() override {
65 testing::Test::TearDown(); 64 testing::Test::TearDown();
66 session_state_delegate_.reset(); 65 session_state_delegate_.reset();
67 user_manager_enabler_.reset(); 66 user_manager_enabler_.reset();
68 user_manager_ = NULL; 67 user_manager_ = NULL;
69 // Clear our cached pointer to the PolicyCertVerifier. 68 // Clear our cached pointer to the PolicyCertVerifier.
70 g_policy_cert_verifier_for_factory = NULL; 69 g_policy_cert_verifier_for_factory = NULL;
71 profile_manager_.reset(); 70 profile_manager_.reset();
72 71
73 // We must ensure that the PolicyCertVerifier outlives the 72 // We must ensure that the PolicyCertVerifier outlives the
74 // PolicyCertService so shutdown the profile here. Additionally, we need 73 // PolicyCertService so shutdown the profile here. Additionally, we need
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 prefs::kMultiProfileUserBehavior, 281 prefs::kMultiProfileUserBehavior,
283 chromeos::MultiProfileUserController::kBehaviorNotAllowed); 282 chromeos::MultiProfileUserController::kBehaviorNotAllowed);
284 user_manager()->AddUser("bb@b.b"); 283 user_manager()->AddUser("bb@b.b");
285 EXPECT_FALSE( 284 EXPECT_FALSE(
286 session_state_delegate()->CanAddUserToMultiProfile(&add_user_error)); 285 session_state_delegate()->CanAddUserToMultiProfile(&add_user_error));
287 EXPECT_EQ(ash::SessionStateDelegate::ADD_USER_ERROR_NOT_ALLOWED_PRIMARY_USER, 286 EXPECT_EQ(ash::SessionStateDelegate::ADD_USER_ERROR_NOT_ALLOWED_PRIMARY_USER,
288 add_user_error); 287 add_user_error);
289 } 288 }
290 289
291 } // namespace chromeos 290 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698