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

Side by Side Diff: chrome/browser/sync/profile_sync_service_password_unittest.cc

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 done.TimedWait(base::TimeDelta::FromMilliseconds( 208 done.TimedWait(base::TimeDelta::FromMilliseconds(
209 TestTimeouts::action_timeout_ms())); 209 TestTimeouts::action_timeout_ms()));
210 } 210 }
211 211
212 void StartSyncService(const base::Closure& root_callback, 212 void StartSyncService(const base::Closure& root_callback,
213 const base::Closure& node_callback) { 213 const base::Closure& node_callback) {
214 if (!service_.get()) { 214 if (!service_.get()) {
215 service_.reset(new PasswordTestProfileSyncService( 215 service_.reset(new PasswordTestProfileSyncService(
216 &factory_, &profile_, "test_user", false, 216 &factory_, &profile_, "test_user", false,
217 root_callback, node_callback)); 217 root_callback, node_callback));
218 syncable::ModelEnumSet preferred_types = 218 syncable::ModelTypeSet preferred_types =
219 service_->GetPreferredDataTypes(); 219 service_->GetPreferredDataTypes();
220 preferred_types.Put(syncable::PASSWORDS); 220 preferred_types.Put(syncable::PASSWORDS);
221 service_->ChangePreferredDataTypes(preferred_types); 221 service_->ChangePreferredDataTypes(preferred_types);
222 EXPECT_CALL(profile_, GetProfileSyncService()).WillRepeatedly( 222 EXPECT_CALL(profile_, GetProfileSyncService()).WillRepeatedly(
223 Return(service_.get())); 223 Return(service_.get()));
224 PasswordDataTypeController* data_type_controller = 224 PasswordDataTypeController* data_type_controller =
225 new PasswordDataTypeController(&factory_, 225 new PasswordDataTypeController(&factory_,
226 &profile_); 226 &profile_);
227 227
228 EXPECT_CALL(factory_, CreatePasswordSyncComponents(_, _, _)). 228 EXPECT_CALL(factory_, CreatePasswordSyncComponents(_, _, _)).
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 CreateRootHelper create_root(this, syncable::PASSWORDS); 608 CreateRootHelper create_root(this, syncable::PASSWORDS);
609 StartSyncService(create_root.callback(), 609 StartSyncService(create_root.callback(),
610 base::Bind(&AddPasswordEntriesCallback, this, sync_forms)); 610 base::Bind(&AddPasswordEntriesCallback, this, sync_forms));
611 611
612 std::vector<PasswordForm> new_sync_forms; 612 std::vector<PasswordForm> new_sync_forms;
613 GetPasswordEntriesFromSyncDB(&new_sync_forms); 613 GetPasswordEntriesFromSyncDB(&new_sync_forms);
614 614
615 EXPECT_EQ(1U, new_sync_forms.size()); 615 EXPECT_EQ(1U, new_sync_forms.size());
616 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); 616 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0]));
617 } 617 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.h ('k') | chrome/browser/sync/profile_sync_service_startup_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698