| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 profile_.get(), | 90 profile_.get(), |
| 91 NULL, | 91 NULL, |
| 92 ProfileSyncService::MANUAL_START)); | 92 ProfileSyncService::MANUAL_START)); |
| 93 pss->factory()->RegisterDataTypes(pss.get()); | 93 pss->factory()->RegisterDataTypes(pss.get()); |
| 94 DataTypeController::StateMap controller_states; | 94 DataTypeController::StateMap controller_states; |
| 95 pss->GetDataTypeControllerStates(&controller_states); | 95 pss->GetDataTypeControllerStates(&controller_states); |
| 96 EXPECT_EQ(DefaultDatatypesCount() - 1, controller_states.size()); | 96 EXPECT_EQ(DefaultDatatypesCount() - 1, controller_states.size()); |
| 97 CheckDefaultDatatypesInMapExcept(&controller_states, type); | 97 CheckDefaultDatatypesInMapExcept(&controller_states, type); |
| 98 } | 98 } |
| 99 | 99 |
| 100 MessageLoop message_loop_; | 100 base::MessageLoop message_loop_; |
| 101 content::TestBrowserThread ui_thread_; | 101 content::TestBrowserThread ui_thread_; |
| 102 scoped_ptr<Profile> profile_; | 102 scoped_ptr<Profile> profile_; |
| 103 scoped_ptr<CommandLine> command_line_; | 103 scoped_ptr<CommandLine> command_line_; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDefault) { | 106 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDefault) { |
| 107 scoped_ptr<ProfileSyncService> pss( | 107 scoped_ptr<ProfileSyncService> pss( |
| 108 new ProfileSyncService( | 108 new ProfileSyncService( |
| 109 new ProfileSyncComponentsFactoryImpl(profile_.get(), | 109 new ProfileSyncComponentsFactoryImpl(profile_.get(), |
| 110 command_line_.get()), | 110 command_line_.get()), |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDisableAutofillProfile) { | 151 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDisableAutofillProfile) { |
| 152 TestSwitchDisablesType(switches::kDisableSyncAutofillProfile, | 152 TestSwitchDisablesType(switches::kDisableSyncAutofillProfile, |
| 153 syncer::AUTOFILL_PROFILE); | 153 syncer::AUTOFILL_PROFILE); |
| 154 } | 154 } |
| 155 | 155 |
| 156 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDisablePasswords) { | 156 TEST_F(ProfileSyncComponentsFactoryImplTest, CreatePSSDisablePasswords) { |
| 157 TestSwitchDisablesType(switches::kDisableSyncPasswords, | 157 TestSwitchDisablesType(switches::kDisableSyncPasswords, |
| 158 syncer::PASSWORDS); | 158 syncer::PASSWORDS); |
| 159 } | 159 } |
| OLD | NEW |