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/bookmark_provider.h" | 5 #include "chrome/browser/autocomplete/bookmark_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "chrome/browser/autocomplete/autocomplete_provider.h" | 16 #include "chrome/browser/autocomplete/autocomplete_provider.h" |
17 #include "chrome/browser/autocomplete/autocomplete_provider_listener.h" | 17 #include "chrome/browser/autocomplete/autocomplete_provider_listener.h" |
18 #include "chrome/browser/bookmarks/bookmark_model.h" | 18 #include "chrome/browser/bookmarks/bookmark_model.h" |
19 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 19 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
20 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 // The bookmark corpus against which we will simulate searches. | 23 // The bookmark corpus against which we will simulate searches. |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 << query_data[i].matches[j] << "' for query: '" | 332 << query_data[i].matches[j] << "' for query: '" |
333 << query_data[i].query << "'."; | 333 << query_data[i].query << "'."; |
334 if (j >= matches.size()) | 334 if (j >= matches.size()) |
335 continue; | 335 continue; |
336 EXPECT_EQ(query_data[i].matches[j], UTF16ToUTF8(matches[j].description)) | 336 EXPECT_EQ(query_data[i].matches[j], UTF16ToUTF8(matches[j].description)) |
337 << " Mismatch at [" << base::IntToString(j) << "] for query '" | 337 << " Mismatch at [" << base::IntToString(j) << "] for query '" |
338 << query_data[i].query << "'."; | 338 << query_data[i].query << "'."; |
339 } | 339 } |
340 } | 340 } |
341 } | 341 } |
OLD | NEW |