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

Side by Side Diff: chrome/browser/autofill/personal_data_manager_unittest.cc

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 3 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 personal_data_ = new PersonalDataManager(); 74 personal_data_ = new PersonalDataManager();
75 personal_data_->Init(profile_.get()); 75 personal_data_->Init(profile_.get());
76 personal_data_->SetObserver(&personal_data_observer_); 76 personal_data_->SetObserver(&personal_data_observer_);
77 77
78 // Verify that the web database has been updated and the notification sent. 78 // Verify that the web database has been updated and the notification sent.
79 EXPECT_CALL(personal_data_observer_, 79 EXPECT_CALL(personal_data_observer_,
80 OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop()); 80 OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
81 MessageLoop::current()->Run(); 81 MessageLoop::current()->Run();
82 } 82 }
83 83
84 ScopedTestingBrowserProcess browser_process_;
85 MessageLoopForUI message_loop_; 84 MessageLoopForUI message_loop_;
86 BrowserThread ui_thread_; 85 BrowserThread ui_thread_;
87 BrowserThread db_thread_; 86 BrowserThread db_thread_;
88 scoped_ptr<TestingProfile> profile_; 87 scoped_ptr<TestingProfile> profile_;
89 scoped_refptr<PersonalDataManager> personal_data_; 88 scoped_refptr<PersonalDataManager> personal_data_;
90 NotificationRegistrar registrar_; 89 NotificationRegistrar registrar_;
91 NotificationObserverMock observer_; 90 NotificationObserverMock observer_;
92 PersonalDataLoadedObserverMock personal_data_observer_; 91 PersonalDataLoadedObserverMock personal_data_observer_;
93 }; 92 };
94 93
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 1850
1852 // Modify expected to include multi-valued fields. 1851 // Modify expected to include multi-valued fields.
1853 std::vector<string16> values; 1852 std::vector<string16> values;
1854 expected.GetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, &values); 1853 expected.GetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, &values);
1855 values.push_back(ASCIIToUTF16("214-555-1234")); 1854 values.push_back(ASCIIToUTF16("214-555-1234"));
1856 expected.SetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, values); 1855 expected.SetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, values);
1857 1856
1858 ASSERT_EQ(1U, results2.size()); 1857 ASSERT_EQ(1U, results2.size());
1859 EXPECT_EQ(0, expected.CompareMulti(*results2[0])); 1858 EXPECT_EQ(0, expected.CompareMulti(*results2[0]));
1860 } 1859 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698