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

Side by Side Diff: chrome/browser/autocomplete/contact_provider_chromeos_unittest.cc

Issue 18878007: Omnibox: Make the Controller Reorder Matches for Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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) 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 const contacts::Contact& exp_contact = 270 const contacts::Contact& exp_contact =
271 *(contacts[kNumContacts - 1 - i]); 271 *(contacts[kNumContacts - 1 - i]);
272 std::string match_id = GetContactIdFromMatch(matches[i]); 272 std::string match_id = GetContactIdFromMatch(matches[i]);
273 EXPECT_EQ(exp_contact.contact_id(), match_id) 273 EXPECT_EQ(exp_contact.contact_id(), match_id)
274 << "Expected contact ID " << exp_contact.contact_id() 274 << "Expected contact ID " << exp_contact.contact_id()
275 << " for match " << i << " but got " << match_id << " instead"; 275 << " for match " << i << " but got " << match_id << " instead";
276 if (i > 0) { 276 if (i > 0) {
277 EXPECT_LE(matches[i].relevance, previous_relevance) 277 EXPECT_LE(matches[i].relevance, previous_relevance)
278 << "Match " << i << " has greater relevance than previous match"; 278 << "Match " << i << " has greater relevance than previous match";
279 } 279 }
280 EXPECT_FALSE(matches[i].allowed_to_be_default_match);
280 previous_relevance = matches[i].relevance; 281 previous_relevance = matches[i].relevance;
281 } 282 }
282 } 283 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/builtin_provider_unittest.cc ('k') | chrome/browser/autocomplete/extension_app_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698