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

Side by Side Diff: chrome/browser/password_manager/password_store_x_unittest.cc

Issue 7465041: GTTF: Use a fresh TestingBrowserProcess for each test, part #4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 9 years, 4 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/platform_file.h" 7 #include "base/platform_file.h"
8 #include "base/scoped_temp_dir.h" 8 #include "base/scoped_temp_dir.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/synchronization/waitable_event.h" 11 #include "base/synchronization/waitable_event.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/password_manager/password_form_data.h" 14 #include "chrome/browser/password_manager/password_form_data.h"
15 #include "chrome/browser/password_manager/password_store_change.h" 15 #include "chrome/browser/password_manager/password_store_change.h"
16 #include "chrome/browser/password_manager/password_store_consumer.h" 16 #include "chrome/browser/password_manager/password_store_consumer.h"
17 #include "chrome/browser/password_manager/password_store_x.h" 17 #include "chrome/browser/password_manager/password_store_x.h"
18 #include "chrome/browser/prefs/pref_service.h" 18 #include "chrome/browser/prefs/pref_service.h"
19 #include "chrome/browser/webdata/web_data_service.h" 19 #include "chrome/browser/webdata/web_data_service.h"
20 #include "chrome/common/chrome_notification_types.h" 20 #include "chrome/common/chrome_notification_types.h"
21 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
22 #include "chrome/test/base/signaling_task.h" 22 #include "chrome/test/base/signaling_task.h"
23 #include "chrome/test/base/testing_profile.h" 23 #include "chrome/test/base/testing_profile.h"
24 #include "chrome/test/testing_browser_process.h"
24 #include "content/common/notification_details.h" 25 #include "content/common/notification_details.h"
25 #include "content/common/notification_observer_mock.h" 26 #include "content/common/notification_observer_mock.h"
26 #include "content/common/notification_registrar.h" 27 #include "content/common/notification_registrar.h"
27 #include "content/common/notification_source.h" 28 #include "content/common/notification_source.h"
28 #include "testing/gmock/include/gmock/gmock.h" 29 #include "testing/gmock/include/gmock/gmock.h"
29 #include "testing/gtest/include/gtest/gtest.h" 30 #include "testing/gtest/include/gtest/gtest.h"
30 31
31 using base::WaitableEvent; 32 using base::WaitableEvent;
32 using testing::_; 33 using testing::_;
33 using testing::DoAll; 34 using testing::DoAll;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 switch (GetParam()) { 310 switch (GetParam()) {
310 case FAILING_BACKEND: 311 case FAILING_BACKEND:
311 return new FailingBackend(); 312 return new FailingBackend();
312 case WORKING_BACKEND: 313 case WORKING_BACKEND:
313 return new MockBackend(); 314 return new MockBackend();
314 default: 315 default:
315 return NULL; 316 return NULL;
316 } 317 }
317 } 318 }
318 319
320 ScopedTestingBrowserProcess browser_process_;
321
319 MessageLoopForUI message_loop_; 322 MessageLoopForUI message_loop_;
320 BrowserThread ui_thread_; 323 BrowserThread ui_thread_;
321 BrowserThread db_thread_; // PasswordStore, WDS schedule work on this thread. 324 BrowserThread db_thread_; // PasswordStore, WDS schedule work on this thread.
322 325
323 scoped_ptr<LoginDatabase> login_db_; 326 scoped_ptr<LoginDatabase> login_db_;
324 scoped_ptr<TestingProfile> profile_; 327 scoped_ptr<TestingProfile> profile_;
325 scoped_refptr<WebDataService> wds_; 328 scoped_refptr<WebDataService> wds_;
326 ScopedTempDir temp_dir_; 329 ScopedTempDir temp_dir_;
327 }; 330 };
328 331
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 762
760 INSTANTIATE_TEST_CASE_P(NoBackend, 763 INSTANTIATE_TEST_CASE_P(NoBackend,
761 PasswordStoreXTest, 764 PasswordStoreXTest,
762 testing::Values(NO_BACKEND)); 765 testing::Values(NO_BACKEND));
763 INSTANTIATE_TEST_CASE_P(FailingBackend, 766 INSTANTIATE_TEST_CASE_P(FailingBackend,
764 PasswordStoreXTest, 767 PasswordStoreXTest,
765 testing::Values(FAILING_BACKEND)); 768 testing::Values(FAILING_BACKEND));
766 INSTANTIATE_TEST_CASE_P(WorkingBackend, 769 INSTANTIATE_TEST_CASE_P(WorkingBackend,
767 PasswordStoreXTest, 770 PasswordStoreXTest,
768 testing::Values(WORKING_BACKEND)); 771 testing::Values(WORKING_BACKEND));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698