OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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> | 5 #include <memory> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 ->GetSyncableService(syncer::PREFERENCES) | 107 ->GetSyncableService(syncer::PREFERENCES) |
108 ->MergeDataAndStartSyncing(syncer::PREFERENCES, syncer::SyncDataList(), | 108 ->MergeDataAndStartSyncing(syncer::PREFERENCES, syncer::SyncDataList(), |
109 std::unique_ptr<syncer::SyncChangeProcessor>( | 109 std::unique_ptr<syncer::SyncChangeProcessor>( |
110 new syncer::FakeSyncChangeProcessor), | 110 new syncer::FakeSyncChangeProcessor), |
111 std::unique_ptr<syncer::SyncErrorFactory>( | 111 std::unique_ptr<syncer::SyncErrorFactory>( |
112 new syncer::SyncErrorFactoryMock())); | 112 new syncer::SyncErrorFactoryMock())); |
113 } | 113 } |
114 | 114 |
115 content::TestBrowserThreadBundle thread_bundle_; | 115 content::TestBrowserThreadBundle thread_bundle_; |
116 std::unique_ptr<FakeArcBridgeService> bridge_service_; | 116 std::unique_ptr<FakeArcBridgeService> bridge_service_; |
| 117 std::unique_ptr<TestingProfile> profile_; |
117 std::unique_ptr<ArcAuthService> auth_service_; | 118 std::unique_ptr<ArcAuthService> auth_service_; |
118 std::unique_ptr<TestingProfile> profile_; | |
119 chromeos::ScopedUserManagerEnabler user_manager_enabler_; | 119 chromeos::ScopedUserManagerEnabler user_manager_enabler_; |
120 base::ScopedTempDir temp_dir_; | 120 base::ScopedTempDir temp_dir_; |
121 | 121 |
122 DISALLOW_COPY_AND_ASSIGN(ArcAuthServiceTest); | 122 DISALLOW_COPY_AND_ASSIGN(ArcAuthServiceTest); |
123 }; | 123 }; |
124 | 124 |
125 TEST_F(ArcAuthServiceTest, PrefChangeTriggersService) { | 125 TEST_F(ArcAuthServiceTest, PrefChangeTriggersService) { |
126 ASSERT_EQ(ArcAuthService::State::NOT_INITIALIZED, auth_service()->state()); | 126 ASSERT_EQ(ArcAuthService::State::NOT_INITIALIZED, auth_service()->state()); |
127 | 127 |
128 PrefService* const pref = profile()->GetPrefs(); | 128 PrefService* const pref = profile()->GetPrefs(); |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 second_profile->GetPrefs()->SetBoolean(prefs::kArcEnabled, true); | 359 second_profile->GetPrefs()->SetBoolean(prefs::kArcEnabled, true); |
360 | 360 |
361 // Check that non-primary user can't use Arc. | 361 // Check that non-primary user can't use Arc. |
362 EXPECT_FALSE(chromeos::ProfileHelper::IsPrimaryProfile(second_profile.get())); | 362 EXPECT_FALSE(chromeos::ProfileHelper::IsPrimaryProfile(second_profile.get())); |
363 EXPECT_FALSE(ArcAppListPrefs::Get(second_profile.get())); | 363 EXPECT_FALSE(ArcAppListPrefs::Get(second_profile.get())); |
364 | 364 |
365 auth_service()->Shutdown(); | 365 auth_service()->Shutdown(); |
366 } | 366 } |
367 | 367 |
368 } // namespace arc | 368 } // namespace arc |
OLD | NEW |