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

Side by Side Diff: chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 "base/location.h" 5 #include "base/location.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/webdata/autofill_profile_syncable_service.h" 8 #include "chrome/browser/webdata/autofill_profile_syncable_service.h"
9 #include "components/autofill/browser/autofill_profile.h" 9 #include "components/autofill/browser/autofill_profile.h"
10 #include "components/autofill/browser/webdata/autofill_change.h" 10 #include "components/autofill/browser/webdata/autofill_change.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 public: 105 public:
106 AutofillProfileSyncableServiceTest() 106 AutofillProfileSyncableServiceTest()
107 : ui_thread_(BrowserThread::UI, &message_loop_), 107 : ui_thread_(BrowserThread::UI, &message_loop_),
108 db_thread_(BrowserThread::DB, &message_loop_) {} 108 db_thread_(BrowserThread::DB, &message_loop_) {}
109 109
110 virtual void SetUp() OVERRIDE { 110 virtual void SetUp() OVERRIDE {
111 sync_processor_.reset(new MockSyncChangeProcessor); 111 sync_processor_.reset(new MockSyncChangeProcessor);
112 } 112 }
113 113
114 protected: 114 protected:
115 MessageLoop message_loop_; 115 base::MessageLoop message_loop_;
116 content::TestBrowserThread ui_thread_; 116 content::TestBrowserThread ui_thread_;
117 content::TestBrowserThread db_thread_; 117 content::TestBrowserThread db_thread_;
118 MockAutofillProfileSyncableService autofill_syncable_service_; 118 MockAutofillProfileSyncableService autofill_syncable_service_;
119 scoped_ptr<MockSyncChangeProcessor> sync_processor_; 119 scoped_ptr<MockSyncChangeProcessor> sync_processor_;
120 }; 120 };
121 121
122 TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) { 122 TEST_F(AutofillProfileSyncableServiceTest, MergeDataAndStartSyncing) {
123 std::vector<AutofillProfile *> profiles_from_web_db; 123 std::vector<AutofillProfile *> profiles_from_web_db;
124 std::string guid_present1 = kGuid1; 124 std::string guid_present1 = kGuid1;
125 std::string guid_present2 = kGuid2; 125 std::string guid_present2 = kGuid2;
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 profile1.GetRawMultiInfo(autofill::EMAIL_ADDRESS, &values); 436 profile1.GetRawMultiInfo(autofill::EMAIL_ADDRESS, &values);
437 ASSERT_EQ(values.size(), 3U); 437 ASSERT_EQ(values.size(), 3U);
438 EXPECT_EQ(values[0], UTF8ToUTF16("1@1.com")); 438 EXPECT_EQ(values[0], UTF8ToUTF16("1@1.com"));
439 EXPECT_EQ(values[1], UTF8ToUTF16("2@1.com")); 439 EXPECT_EQ(values[1], UTF8ToUTF16("2@1.com"));
440 EXPECT_EQ(values[2], UTF8ToUTF16("3@1.com")); 440 EXPECT_EQ(values[2], UTF8ToUTF16("3@1.com"));
441 441
442 profile1.GetRawMultiInfo(autofill::PHONE_HOME_WHOLE_NUMBER, &values); 442 profile1.GetRawMultiInfo(autofill::PHONE_HOME_WHOLE_NUMBER, &values);
443 ASSERT_EQ(values.size(), 1U); 443 ASSERT_EQ(values.size(), 1U);
444 EXPECT_EQ(values[0], UTF8ToUTF16("650234567")); 444 EXPECT_EQ(values[0], UTF8ToUTF16("650234567"));
445 } 445 }
OLDNEW
« no previous file with comments | « chrome/browser/web_resource/web_resource_service.cc ('k') | chrome/test/chromedriver/chrome/device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698