| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 profile_.get(), | 97 profile_.get(), |
| 98 NULL, | 98 NULL, |
| 99 ProfileSyncService::MANUAL_START)); | 99 ProfileSyncService::MANUAL_START)); |
| 100 pss->factory()->RegisterDataTypes(pss.get()); | 100 pss->factory()->RegisterDataTypes(pss.get()); |
| 101 DataTypeController::StateMap controller_states; | 101 DataTypeController::StateMap controller_states; |
| 102 pss->GetDataTypeControllerStates(&controller_states); | 102 pss->GetDataTypeControllerStates(&controller_states); |
| 103 EXPECT_EQ(DefaultDatatypesCount() - 1, controller_states.size()); | 103 EXPECT_EQ(DefaultDatatypesCount() - 1, controller_states.size()); |
| 104 CheckDefaultDatatypesInMapExcept(&controller_states, type); | 104 CheckDefaultDatatypesInMapExcept(&controller_states, type); |
| 105 } | 105 } |
| 106 | 106 |
| 107 MessageLoop message_loop_; | 107 base::MessageLoop message_loop_; |
| 108 content::TestBrowserThread ui_thread_; | 108 content::TestBrowserThread ui_thread_; |
| 109 scoped_ptr<Profile> profile_; | 109 scoped_ptr<Profile> profile_; |
| 110 scoped_ptr<CommandLine> command_line_; | 110 scoped_ptr<CommandLine> command_line_; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDefault) { | 113 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDefault) { |
| 114 scoped_ptr<ProfileSyncService> pss( | 114 scoped_ptr<ProfileSyncService> pss( |
| 115 new ProfileSyncService( | 115 new ProfileSyncService( |
| 116 new ProfileSyncComponentsFactoryImpl(profile_.get(), | 116 new ProfileSyncComponentsFactoryImpl(profile_.get(), |
| 117 command_line_.get()), | 117 command_line_.get()), |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDisableAutofillProfile) { | 158 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDisableAutofillProfile) { |
| 159 TestSwitchDisablesType(switches::kDisableSyncAutofillProfile, | 159 TestSwitchDisablesType(switches::kDisableSyncAutofillProfile, |
| 160 syncer::AUTOFILL_PROFILE); | 160 syncer::AUTOFILL_PROFILE); |
| 161 } | 161 } |
| 162 | 162 |
| 163 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDisablePasswords) { | 163 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDisablePasswords) { |
| 164 TestSwitchDisablesType(switches::kDisableSyncPasswords, | 164 TestSwitchDisablesType(switches::kDisableSyncPasswords, |
| 165 syncer::PASSWORDS); | 165 syncer::PASSWORDS); |
| 166 } | 166 } |
| OLD | NEW |