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

Unified Diff: chrome/browser/autofill/autofill_merge_unittest.cc

Issue 8043027: AutofillMergeTest doesn't need scoped_ptr for PersonalDataManager mock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_merge_unittest.cc
diff --git a/chrome/browser/autofill/autofill_merge_unittest.cc b/chrome/browser/autofill/autofill_merge_unittest.cc
index 327a2a9dd15120f9ed9f3c5df6ca442519bf6619..f232f2a6eca899131d06b4c2acc0bca2a771ae83 100644
--- a/chrome/browser/autofill/autofill_merge_unittest.cc
+++ b/chrome/browser/autofill/autofill_merge_unittest.cc
@@ -128,7 +128,7 @@ class AutofillMergeTest : public testing::Test,
// sequentially, and fills |merged_profiles| with the serialized result.
void MergeProfiles(const std::string& profiles, std::string* merged_profiles);
- scoped_ptr<PersonalDataManagerMock> personal_data_;
+ PersonalDataManagerMock personal_data_;
private:
DISALLOW_COPY_AND_ASSIGN(AutofillMergeTest);
@@ -142,8 +142,6 @@ AutofillMergeTest::~AutofillMergeTest() {
void AutofillMergeTest::SetUp() {
autofill_test::DisableSystemServices(NULL);
-
- personal_data_.reset(new PersonalDataManagerMock);
}
void AutofillMergeTest::GenerateResults(const std::string& input,
@@ -154,7 +152,7 @@ void AutofillMergeTest::GenerateResults(const std::string& input,
void AutofillMergeTest::MergeProfiles(const std::string& profiles,
std::string* merged_profiles) {
// Start with no saved profiles.
- personal_data_->Reset();
+ personal_data_.Reset();
// Create a test form.
webkit_glue::FormData form;
@@ -202,15 +200,15 @@ void AutofillMergeTest::MergeProfiles(const std::string& profiles,
// Import the profile.
const CreditCard* imported_credit_card;
- personal_data_->ImportFormData(form_structure, &imported_credit_card);
- EXPECT_FALSE(imported_credit_card);
+ personal_data_.ImportFormData(form_structure, &imported_credit_card);
+ EXPECT_EQ(static_cast<const CreditCard*>(NULL), imported_credit_card);
// Clear the |form| to start a new profile.
form.fields.clear();
}
}
- *merged_profiles = SerializeProfiles(personal_data_->web_profiles());
+ *merged_profiles = SerializeProfiles(personal_data_.web_profiles());
}
TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698