OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |