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

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

Issue 2403053003: Remove unused email from install attributes and add support for AD. (Closed)
Patch Set: Address Maksim's comments. Created 4 years, 2 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 "chrome/browser/chromeos/policy/affiliated_invalidation_service_provide r_impl.h" 5 #include "chrome/browser/chromeos/policy/affiliated_invalidation_service_provide r_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 FakeConsumer::GetInvalidationService() const { 186 FakeConsumer::GetInvalidationService() const {
187 return invalidation_service_; 187 return invalidation_service_;
188 } 188 }
189 189
190 AffiliatedInvalidationServiceProviderImplTest:: 190 AffiliatedInvalidationServiceProviderImplTest::
191 AffiliatedInvalidationServiceProviderImplTest() 191 AffiliatedInvalidationServiceProviderImplTest()
192 : device_invalidation_service_(nullptr), 192 : device_invalidation_service_(nullptr),
193 profile_invalidation_service_(nullptr), 193 profile_invalidation_service_(nullptr),
194 fake_user_manager_(new chromeos::FakeChromeUserManager), 194 fake_user_manager_(new chromeos::FakeChromeUserManager),
195 user_manager_enabler_(fake_user_manager_), 195 user_manager_enabler_(fake_user_manager_),
196 install_attributes_("example.com", 196 install_attributes_(
197 "user@example.com", 197 chromeos::ScopedStubInstallAttributes::CreateEnterprise(
198 "device_id", 198 "example.com", "device_id")),
199 DEVICE_MODE_ENTERPRISE),
200 profile_manager_(TestingBrowserProcess::GetGlobal()) { 199 profile_manager_(TestingBrowserProcess::GetGlobal()) {
201 } 200 }
202 201
203 void AffiliatedInvalidationServiceProviderImplTest::SetUp() { 202 void AffiliatedInvalidationServiceProviderImplTest::SetUp() {
204 chromeos::SystemSaltGetter::Initialize(); 203 chromeos::SystemSaltGetter::Initialize();
205 chromeos::DBusThreadManager::Initialize(); 204 chromeos::DBusThreadManager::Initialize();
206 ASSERT_TRUE(profile_manager_.SetUp()); 205 ASSERT_TRUE(profile_manager_.SetUp());
207 206
208 test_device_settings_service_.reset(new 207 test_device_settings_service_.reset(new
209 chromeos::ScopedTestDeviceSettingsService); 208 chromeos::ScopedTestDeviceSettingsService);
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 EXPECT_EQ(0, consumer_->GetAndClearInvalidationServiceSetCount()); 673 EXPECT_EQ(0, consumer_->GetAndClearInvalidationServiceSetCount());
675 provider_->Shutdown(); 674 provider_->Shutdown();
676 EXPECT_EQ(1, consumer_->GetAndClearInvalidationServiceSetCount()); 675 EXPECT_EQ(1, consumer_->GetAndClearInvalidationServiceSetCount());
677 EXPECT_EQ(nullptr, consumer_->GetInvalidationService()); 676 EXPECT_EQ(nullptr, consumer_->GetInvalidationService());
678 677
679 // Verify that the device-global invalidation service has been destroyed. 678 // Verify that the device-global invalidation service has been destroyed.
680 EXPECT_FALSE(provider_->GetDeviceInvalidationServiceForTest()); 679 EXPECT_FALSE(provider_->GetDeviceInvalidationServiceForTest());
681 } 680 }
682 681
683 } // namespace policy 682 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698