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

Side by Side Diff: chrome/browser/autocomplete/contact_provider_chromeos_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 "chrome/browser/autocomplete/contact_provider_chromeos.h" 5 #include "chrome/browser/autocomplete/contact_provider_chromeos.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 std::string result; 116 std::string result;
117 for (StringMap::const_iterator it = contact_id_classifications.begin(); 117 for (StringMap::const_iterator it = contact_id_classifications.begin();
118 it != contact_id_classifications.end(); ++it) { 118 it != contact_id_classifications.end(); ++it) {
119 if (!result.empty()) 119 if (!result.empty())
120 result += ";"; 120 result += ";";
121 result += it->second; 121 result += it->second;
122 } 122 }
123 return result; 123 return result;
124 } 124 }
125 125
126 MessageLoopForUI message_loop_; 126 base::MessageLoopForUI message_loop_;
127 content::TestBrowserThread ui_thread_; 127 content::TestBrowserThread ui_thread_;
128 128
129 scoped_ptr<TestingProfileManager> profile_manager_; 129 scoped_ptr<TestingProfileManager> profile_manager_;
130 TestingProfile* profile_; 130 TestingProfile* profile_;
131 131
132 scoped_ptr<contacts::ContactManagerStub> contact_manager_; 132 scoped_ptr<contacts::ContactManagerStub> contact_manager_;
133 scoped_refptr<ContactProvider> contact_provider_; 133 scoped_refptr<ContactProvider> contact_provider_;
134 }; 134 };
135 135
136 TEST_F(ContactProviderTest, BasicMatching) { 136 TEST_F(ContactProviderTest, BasicMatching) {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 EXPECT_EQ(exp_contact.contact_id(), match_id) 272 EXPECT_EQ(exp_contact.contact_id(), match_id)
273 << "Expected contact ID " << exp_contact.contact_id() 273 << "Expected contact ID " << exp_contact.contact_id()
274 << " for match " << i << " but got " << match_id << " instead"; 274 << " for match " << i << " but got " << match_id << " instead";
275 if (i > 0) { 275 if (i > 0) {
276 EXPECT_LE(matches[i].relevance, previous_relevance) 276 EXPECT_LE(matches[i].relevance, previous_relevance)
277 << "Match " << i << " has greater relevance than previous match"; 277 << "Match " << i << " has greater relevance than previous match";
278 } 278 }
279 previous_relevance = matches[i].relevance; 279 previous_relevance = matches[i].relevance;
280 } 280 }
281 } 281 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698