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

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

Issue 6250135: [SYNC] Fix handling of password store corruption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests. 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 WillOnce(ReturnNewDataTypeManager()); 183 WillOnce(ReturnNewDataTypeManager());
184 184
185 // We need tokens to get the tests going 185 // We need tokens to get the tests going
186 token_service_.IssueAuthTokenForTest( 186 token_service_.IssueAuthTokenForTest(
187 GaiaConstants::kSyncService, "token"); 187 GaiaConstants::kSyncService, "token");
188 188
189 EXPECT_CALL(profile_, GetTokenService()). 189 EXPECT_CALL(profile_, GetTokenService()).
190 WillRepeatedly(Return(&token_service_)); 190 WillRepeatedly(Return(&token_service_));
191 191
192 EXPECT_CALL(profile_, GetPasswordStore(_)). 192 EXPECT_CALL(profile_, GetPasswordStore(_)).
193 Times(2). 193 Times(3).
194 WillRepeatedly(Return(password_store_.get())); 194 WillRepeatedly(Return(password_store_.get()));
195 195
196 EXPECT_CALL(observer_, 196 EXPECT_CALL(observer_,
197 Observe( 197 Observe(
198 NotificationType(NotificationType::SYNC_CONFIGURE_DONE),_,_)); 198 NotificationType(NotificationType::SYNC_CONFIGURE_DONE),_,_));
199 199
200 service_->RegisterDataTypeController(data_type_controller); 200 service_->RegisterDataTypeController(data_type_controller);
201 service_->Initialize(); 201 service_->Initialize();
202 MessageLoop::current()->Run(); 202 MessageLoop::current()->Run();
203 203
(...skipping 318 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