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

Side by Side Diff: chrome/browser/chromeos/policy/user_affiliation_browsertest.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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 <memory>
6
5 #include "base/macros.h" 7 #include "base/macros.h"
6 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/ptr_util.h"
7 #include "chrome/browser/chromeos/policy/affiliation_test_helper.h" 9 #include "chrome/browser/chromeos/policy/affiliation_test_helper.h"
8 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" 10 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h"
9 #include "chromeos/dbus/dbus_thread_manager.h" 11 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "chromeos/dbus/fake_session_manager_client.h" 12 #include "chromeos/dbus/fake_session_manager_client.h"
11 #include "chromeos/dbus/session_manager_client.h" 13 #include "chromeos/dbus/session_manager_client.h"
12 #include "components/user_manager/user.h" 14 #include "components/user_manager/user.h"
13 #include "components/user_manager/user_manager.h" 15 #include "components/user_manager/user_manager.h"
14 #include "content/public/test/test_utils.h" 16 #include "content/public/test/test_utils.h"
15 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
16 18
(...skipping 25 matching lines...) Expand all
42 command_line); 44 command_line);
43 } 45 }
44 46
45 // InProcessBrowserTest 47 // InProcessBrowserTest
46 void SetUpInProcessBrowserTestFixture() override { 48 void SetUpInProcessBrowserTestFixture() override {
47 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); 49 InProcessBrowserTest::SetUpInProcessBrowserTestFixture();
48 50
49 chromeos::FakeSessionManagerClient* fake_session_manager_client = 51 chromeos::FakeSessionManagerClient* fake_session_manager_client =
50 new chromeos::FakeSessionManagerClient; 52 new chromeos::FakeSessionManagerClient;
51 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( 53 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient(
52 make_scoped_ptr<chromeos::SessionManagerClient>( 54 base::WrapUnique<chromeos::SessionManagerClient>(
53 fake_session_manager_client)); 55 fake_session_manager_client));
54 56
55 UserPolicyBuilder user_policy; 57 UserPolicyBuilder user_policy;
56 DevicePolicyCrosTestHelper test_helper; 58 DevicePolicyCrosTestHelper test_helper;
57 59
58 std::set<std::string> device_affiliation_ids; 60 std::set<std::string> device_affiliation_ids;
59 device_affiliation_ids.insert(kAffiliationID); 61 device_affiliation_ids.insert(kAffiliationID);
60 affiliation_test_helper::SetDeviceAffiliationID( 62 affiliation_test_helper::SetDeviceAffiliationID(
61 &test_helper, fake_session_manager_client, device_affiliation_ids); 63 &test_helper, fake_session_manager_client, device_affiliation_ids);
62 64
(...skipping 22 matching lines...) Expand all
85 user_manager::UserManager::Get() 87 user_manager::UserManager::Get()
86 ->FindUser(AccountId::FromUserEmail(kAffiliatedUser)) 88 ->FindUser(AccountId::FromUserEmail(kAffiliatedUser))
87 ->IsAffiliated()); 89 ->IsAffiliated());
88 } 90 }
89 91
90 INSTANTIATE_TEST_CASE_P(AffiliationCheck, 92 INSTANTIATE_TEST_CASE_P(AffiliationCheck,
91 UserAffiliationBrowserTest, 93 UserAffiliationBrowserTest,
92 ::testing::Values(Params(true), Params(false))); 94 ::testing::Values(Params(true), Params(false)));
93 95
94 } // namespace policy 96 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698