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

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

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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) 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 "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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 protected: 154 protected:
155 ProfileSyncServicePasswordTest() {} 155 ProfileSyncServicePasswordTest() {}
156 156
157 virtual void SetUp() { 157 virtual void SetUp() {
158 AbstractProfileSyncServiceTest::SetUp(); 158 AbstractProfileSyncServiceTest::SetUp();
159 profile_.CreateRequestContext(); 159 profile_.CreateRequestContext();
160 password_store_ = static_cast<MockPasswordStore*>( 160 password_store_ = static_cast<MockPasswordStore*>(
161 PasswordStoreFactory::GetInstance()->SetTestingFactoryAndUse( 161 PasswordStoreFactory::GetInstance()->SetTestingFactoryAndUse(
162 &profile_, MockPasswordStore::Build)); 162 &profile_, MockPasswordStore::Build).get());
163 163
164 registrar_.Add(&observer_, 164 registrar_.Add(&observer_,
165 chrome::NOTIFICATION_SYNC_CONFIGURE_DONE, 165 chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
166 content::NotificationService::AllSources()); 166 content::NotificationService::AllSources());
167 registrar_.Add(&observer_, 167 registrar_.Add(&observer_,
168 chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED, 168 chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED,
169 content::NotificationService::AllSources()); 169 content::NotificationService::AllSources());
170 } 170 }
171 171
172 virtual void TearDown() { 172 virtual void TearDown() {
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 CreateRootHelper create_root(this, syncable::PASSWORDS); 588 CreateRootHelper create_root(this, syncable::PASSWORDS);
589 StartSyncService(create_root.callback(), 589 StartSyncService(create_root.callback(),
590 base::Bind(&AddPasswordEntriesCallback, this, sync_forms)); 590 base::Bind(&AddPasswordEntriesCallback, this, sync_forms));
591 591
592 std::vector<PasswordForm> new_sync_forms; 592 std::vector<PasswordForm> new_sync_forms;
593 GetPasswordEntriesFromSyncDB(&new_sync_forms); 593 GetPasswordEntriesFromSyncDB(&new_sync_forms);
594 594
595 EXPECT_EQ(1U, new_sync_forms.size()); 595 EXPECT_EQ(1U, new_sync_forms.size());
596 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); 596 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0]));
597 } 597 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.cc ('k') | chrome/browser/sync/sync_setup_wizard_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698