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

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

Issue 6543037: Merge 73754 - [SYNC] Fix handling of password store corruption.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/648/src/
Patch Set: Created 9 years, 10 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
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/task.h" 9 #include "base/task.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 WillOnce(ReturnNewDataTypeManager()); 182 WillOnce(ReturnNewDataTypeManager());
183 183
184 // We need tokens to get the tests going 184 // We need tokens to get the tests going
185 token_service_.IssueAuthTokenForTest( 185 token_service_.IssueAuthTokenForTest(
186 GaiaConstants::kSyncService, "token"); 186 GaiaConstants::kSyncService, "token");
187 187
188 EXPECT_CALL(profile_, GetTokenService()). 188 EXPECT_CALL(profile_, GetTokenService()).
189 WillRepeatedly(Return(&token_service_)); 189 WillRepeatedly(Return(&token_service_));
190 190
191 EXPECT_CALL(profile_, GetPasswordStore(_)). 191 EXPECT_CALL(profile_, GetPasswordStore(_)).
192 Times(2). 192 Times(3).
193 WillRepeatedly(Return(password_store_.get())); 193 WillRepeatedly(Return(password_store_.get()));
194 194
195 EXPECT_CALL(observer_, 195 EXPECT_CALL(observer_,
196 Observe( 196 Observe(
197 NotificationType(NotificationType::SYNC_CONFIGURE_DONE),_,_)); 197 NotificationType(NotificationType::SYNC_CONFIGURE_DONE),_,_));
198 198
199 service_->RegisterDataTypeController(data_type_controller); 199 service_->RegisterDataTypeController(data_type_controller);
200 service_->Initialize(); 200 service_->Initialize();
201 MessageLoop::current()->Run(); 201 MessageLoop::current()->Run();
202 202
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 AddPasswordEntriesTask node_task(this, sync_forms); 522 AddPasswordEntriesTask node_task(this, sync_forms);
523 523
524 StartSyncService(&root_task, &node_task); 524 StartSyncService(&root_task, &node_task);
525 525
526 std::vector<PasswordForm> new_sync_forms; 526 std::vector<PasswordForm> new_sync_forms;
527 GetPasswordEntriesFromSyncDB(&new_sync_forms); 527 GetPasswordEntriesFromSyncDB(&new_sync_forms);
528 528
529 EXPECT_EQ(1U, new_sync_forms.size()); 529 EXPECT_EQ(1U, new_sync_forms.size());
530 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); 530 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0]));
531 } 531 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698