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> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/browser/autocomplete/autocomplete_input.h" | 17 #include "chrome/browser/autocomplete/autocomplete_input.h" |
18 #include "chrome/browser/autocomplete/autocomplete_match.h" | 18 #include "chrome/browser/autocomplete/autocomplete_match.h" |
19 #include "chrome/browser/autocomplete/autocomplete_provider.h" | 19 #include "chrome/browser/autocomplete/autocomplete_provider.h" |
20 #include "chrome/browser/chromeos/contacts/contact.pb.h" | 20 #include "chrome/browser/chromeos/contacts/contact.pb.h" |
21 #include "chrome/browser/chromeos/contacts/contact_manager_stub.h" | 21 #include "chrome/browser/chromeos/contacts/contact_manager_stub.h" |
22 #include "chrome/browser/chromeos/contacts/contact_test_util.h" | 22 #include "chrome/browser/chromeos/contacts/contact_test_util.h" |
23 #include "chrome/test/base/testing_browser_process.h" | 23 #include "chrome/test/base/testing_browser_process.h" |
24 #include "chrome/test/base/testing_profile.h" | 24 #include "chrome/test/base/testing_profile.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |