| OLD | NEW |
| 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 #import <WebKit/WebKit.h> | 5 #import <WebKit/WebKit.h> |
| 6 | 6 |
| 7 #import "base/mac/scoped_nsobject.h" | 7 #import "base/mac/scoped_nsobject.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "components/pref_registry/testing_pref_service_syncable.h" | 9 #include "components/pref_registry/testing_pref_service_syncable.h" |
| 10 #include "components/signin/core/browser/account_reconcilor.h" | 10 #include "components/signin/core/browser/account_reconcilor.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 AccountTrackerService::RegisterPrefs(prefs_.registry()); | 119 AccountTrackerService::RegisterPrefs(prefs_.registry()); |
| 120 content_settings::CookieSettings::RegisterProfilePrefs(prefs_.registry()); | 120 content_settings::CookieSettings::RegisterProfilePrefs(prefs_.registry()); |
| 121 HostContentSettingsMap::RegisterProfilePrefs(prefs_.registry()); | 121 HostContentSettingsMap::RegisterProfilePrefs(prefs_.registry()); |
| 122 SigninManagerBase::RegisterProfilePrefs(prefs_.registry()); | 122 SigninManagerBase::RegisterProfilePrefs(prefs_.registry()); |
| 123 | 123 |
| 124 gaia_cookie_manager_service_.reset(new MockGaiaCookieManagerService()); | 124 gaia_cookie_manager_service_.reset(new MockGaiaCookieManagerService()); |
| 125 signin_client_.reset(new TestSigninClient(&prefs_)); | 125 signin_client_.reset(new TestSigninClient(&prefs_)); |
| 126 signin_manager_.reset(new FakeSigninManager( | 126 signin_manager_.reset(new FakeSigninManager( |
| 127 signin_client_.get(), nullptr, &account_tracker_service_, nullptr)); | 127 signin_client_.get(), nullptr, &account_tracker_service_, nullptr)); |
| 128 account_tracker_service_.Initialize(signin_client_.get()); | 128 account_tracker_service_.Initialize(signin_client_.get()); |
| 129 settings_map_ = new HostContentSettingsMap(&prefs_, false); | 129 settings_map_ = new HostContentSettingsMap( |
| 130 &prefs_, false /* incognito_profile */, false /* guest_profile */); |
| 130 cookie_settings_ = | 131 cookie_settings_ = |
| 131 new content_settings::CookieSettings(settings_map_.get(), &prefs_, ""); | 132 new content_settings::CookieSettings(settings_map_.get(), &prefs_, ""); |
| 132 ResetAccountConsistencyService(); | 133 ResetAccountConsistencyService(); |
| 133 } | 134 } |
| 134 | 135 |
| 135 void TearDown() override { | 136 void TearDown() override { |
| 136 account_consistency_service_->Shutdown(); | 137 account_consistency_service_->Shutdown(); |
| 137 settings_map_->ShutdownOnUIThread(); | 138 settings_map_->ShutdownOnUIThread(); |
| 138 web::BrowserState::GetActiveStateManager(&browser_state_)->SetActive(false); | 139 web::BrowserState::GetActiveStateManager(&browser_state_)->SetActive(false); |
| 139 PlatformTest::TearDown(); | 140 PlatformTest::TearDown(); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 prefs_.GetDictionary(AccountConsistencyService::kDomainsWithCookiePref); | 385 prefs_.GetDictionary(AccountConsistencyService::kDomainsWithCookiePref); |
| 385 EXPECT_EQ(2u, dict->size()); | 386 EXPECT_EQ(2u, dict->size()); |
| 386 | 387 |
| 387 EXPECT_CALL(*gaia_cookie_manager_service_, ForceOnCookieChangedProcessing()) | 388 EXPECT_CALL(*gaia_cookie_manager_service_, ForceOnCookieChangedProcessing()) |
| 388 .Times(1); | 389 .Times(1); |
| 389 account_consistency_service_->OnBrowsingDataRemoved(); | 390 account_consistency_service_->OnBrowsingDataRemoved(); |
| 390 dict = | 391 dict = |
| 391 prefs_.GetDictionary(AccountConsistencyService::kDomainsWithCookiePref); | 392 prefs_.GetDictionary(AccountConsistencyService::kDomainsWithCookiePref); |
| 392 EXPECT_EQ(0u, dict->size()); | 393 EXPECT_EQ(0u, dict->size()); |
| 393 } | 394 } |
| OLD | NEW |