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

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

Issue 7792093: Moved the handling of the initial passphrase into SyncSetupFlow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Painful merge after phajdan's last-minute huge bulk file move. Created 9 years, 3 months 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/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 Observe( 230 Observe(
231 int( 231 int(
232 chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED),_,_)) 232 chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED),_,_))
233 .WillOnce(InvokeWithoutArgs(QuitMessageLoop)); 233 .WillOnce(InvokeWithoutArgs(QuitMessageLoop));
234 234
235 service_->RegisterDataTypeController(data_type_controller); 235 service_->RegisterDataTypeController(data_type_controller);
236 service_->Initialize(); 236 service_->Initialize();
237 MessageLoop::current()->Run(); 237 MessageLoop::current()->Run();
238 FlushLastDBTask(); 238 FlushLastDBTask();
239 239
240 service_->SetPassphrase("foo", false, true); 240 service_->SetPassphrase("foo", false);
241 MessageLoop::current()->Run(); 241 MessageLoop::current()->Run();
242 } 242 }
243 } 243 }
244 244
245 void AddPasswordSyncNode(const PasswordForm& entry) { 245 void AddPasswordSyncNode(const PasswordForm& entry) {
246 sync_api::WriteTransaction trans(FROM_HERE, service_->GetUserShare()); 246 sync_api::WriteTransaction trans(FROM_HERE, service_->GetUserShare());
247 sync_api::ReadNode password_root(&trans); 247 sync_api::ReadNode password_root(&trans);
248 ASSERT_TRUE(password_root.InitByTagLookup(browser_sync::kPasswordTag)); 248 ASSERT_TRUE(password_root.InitByTagLookup(browser_sync::kPasswordTag));
249 249
250 sync_api::WriteNode node(&trans); 250 sync_api::WriteNode node(&trans);
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 AddPasswordEntriesTask node_task(this, sync_forms); 615 AddPasswordEntriesTask node_task(this, sync_forms);
616 616
617 StartSyncService(&root_task, &node_task); 617 StartSyncService(&root_task, &node_task);
618 618
619 std::vector<PasswordForm> new_sync_forms; 619 std::vector<PasswordForm> new_sync_forms;
620 GetPasswordEntriesFromSyncDB(&new_sync_forms); 620 GetPasswordEntriesFromSyncDB(&new_sync_forms);
621 621
622 EXPECT_EQ(1U, new_sync_forms.size()); 622 EXPECT_EQ(1U, new_sync_forms.size());
623 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); 623 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0]));
624 } 624 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_harness.cc ('k') | chrome/browser/sync/sync_setup_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698