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

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

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/location.h" 9 #include "base/location.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 virtual void SetUp() { 159 virtual void SetUp() {
160 AbstractProfileSyncServiceTest::SetUp(); 160 AbstractProfileSyncServiceTest::SetUp();
161 profile_.CreateRequestContext(); 161 profile_.CreateRequestContext();
162 password_store_ = new MockPasswordStore(); 162 password_store_ = new MockPasswordStore();
163 163
164 notification_service_ = new ThreadNotificationService(&db_thread_); 164 notification_service_ = new ThreadNotificationService(&db_thread_);
165 notification_service_->Init(); 165 notification_service_->Init();
166 registrar_.Add(&observer_, 166 registrar_.Add(&observer_,
167 chrome::NOTIFICATION_SYNC_CONFIGURE_DONE, 167 chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
168 NotificationService::AllSources()); 168 content::NotificationService::AllSources());
169 registrar_.Add(&observer_, 169 registrar_.Add(&observer_,
170 chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED, 170 chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED,
171 NotificationService::AllSources()); 171 content::NotificationService::AllSources());
172 } 172 }
173 173
174 virtual void TearDown() { 174 virtual void TearDown() {
175 password_store_->Shutdown(); 175 password_store_->Shutdown();
176 service_.reset(); 176 service_.reset();
177 notification_service_->TearDown(); 177 notification_service_->TearDown();
178 profile_.ResetRequestContext(); 178 profile_.ResetRequestContext();
179 AbstractProfileSyncServiceTest::TearDown(); 179 AbstractProfileSyncServiceTest::TearDown();
180 } 180 }
181 181
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 AddPasswordEntriesTask node_task(this, sync_forms); 617 AddPasswordEntriesTask node_task(this, sync_forms);
618 618
619 StartSyncService(&root_task, &node_task); 619 StartSyncService(&root_task, &node_task);
620 620
621 std::vector<PasswordForm> new_sync_forms; 621 std::vector<PasswordForm> new_sync_forms;
622 GetPasswordEntriesFromSyncDB(&new_sync_forms); 622 GetPasswordEntriesFromSyncDB(&new_sync_forms);
623 623
624 EXPECT_EQ(1U, new_sync_forms.size()); 624 EXPECT_EQ(1U, new_sync_forms.size());
625 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); 625 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0]));
626 } 626 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698