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

Side by Side Diff: chrome/browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_apitest.cc

Issue 2737733003: Add Active Directory login UI tests (Closed)
Patch Set: Rebase Created 3 years, 9 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 "base/memory/ptr_util.h" 5 #include "base/memory/ptr_util.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/chromeos/policy/affiliation_test_helper.h" 8 #include "chrome/browser/chromeos/policy/affiliation_test_helper.h"
9 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 9 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
10 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" 10 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 policy::UserPolicyBuilder user_policy; 93 policy::UserPolicyBuilder user_policy;
94 policy::affiliation_test_helper::SetUserAffiliationIDs( 94 policy::affiliation_test_helper::SetUserAffiliationIDs(
95 &user_policy, fake_session_manager_client, 95 &user_policy, fake_session_manager_client,
96 affiliated_account_id_.GetUserEmail(), user_affiliation_ids); 96 affiliated_account_id_.GetUserEmail(), user_affiliation_ids);
97 97
98 // Set up fake install attributes. 98 // Set up fake install attributes.
99 std::unique_ptr<chromeos::StubInstallAttributes> attributes = 99 std::unique_ptr<chromeos::StubInstallAttributes> attributes =
100 base::MakeUnique<chromeos::StubInstallAttributes>(); 100 base::MakeUnique<chromeos::StubInstallAttributes>();
101 101
102 attributes->SetEnterprise("fake-domain", "fake-id"); 102 attributes->SetCloudManaged("fake-domain", "fake-id");
103 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( 103 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting(
104 attributes.release()); 104 attributes.release());
105 105
106 test_helper_.InstallOwnerKey(); 106 test_helper_.InstallOwnerKey();
107 // Init the device policy. 107 // Init the device policy.
108 policy::DevicePolicyBuilder* device_policy = test_helper_.device_policy(); 108 policy::DevicePolicyBuilder* device_policy = test_helper_.device_policy();
109 device_policy->SetDefaultSigningKey(); 109 device_policy->SetDefaultSigningKey();
110 device_policy->policy_data().set_directory_api_id(kDeviceId); 110 device_policy->policy_data().set_directory_api_id(kDeviceId);
111 device_policy->Build(); 111 device_policy->Build();
112 112
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 "'enterprise.deviceAttributes' is not allowed for specified install " 238 "'enterprise.deviceAttributes' is not allowed for specified install "
239 "location.", 239 "location.",
240 extension->install_warnings()[0].message); 240 extension->install_warnings()[0].message);
241 } 241 }
242 242
243 // Both cases of affiliated and non-affiliated on the device user are tested. 243 // Both cases of affiliated and non-affiliated on the device user are tested.
244 INSTANTIATE_TEST_CASE_P(AffiliationCheck, 244 INSTANTIATE_TEST_CASE_P(AffiliationCheck,
245 EnterpriseDeviceAttributesTest, 245 EnterpriseDeviceAttributesTest,
246 ::testing::Values(Params(true), Params(false))); 246 ::testing::Values(Params(true), Params(false)));
247 } // namespace extensions 247 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698