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

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

Issue 339433007: Componentize URLDatabase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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/history_quick_provider.h" 5 #include "chrome/browser/autocomplete/history_quick_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/format_macros.h" 13 #include "base/format_macros.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/prefs/pref_service.h" 16 #include "base/prefs/pref_service.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "chrome/browser/autocomplete/autocomplete_match.h" 19 #include "chrome/browser/autocomplete/autocomplete_match.h"
20 #include "chrome/browser/autocomplete/autocomplete_provider_listener.h" 20 #include "chrome/browser/autocomplete/autocomplete_provider_listener.h"
21 #include "chrome/browser/autocomplete/autocomplete_result.h" 21 #include "chrome/browser/autocomplete/autocomplete_result.h"
22 #include "chrome/browser/autocomplete/history_url_provider.h" 22 #include "chrome/browser/autocomplete/history_url_provider.h"
23 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 23 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
24 #include "chrome/browser/chrome_notification_types.h" 24 #include "chrome/browser/chrome_notification_types.h"
25 #include "chrome/browser/history/history_backend.h" 25 #include "chrome/browser/history/history_backend.h"
26 #include "chrome/browser/history/history_database.h" 26 #include "chrome/browser/history/history_database.h"
27 #include "chrome/browser/history/history_service.h" 27 #include "chrome/browser/history/history_service.h"
28 #include "chrome/browser/history/history_service_factory.h" 28 #include "chrome/browser/history/history_service_factory.h"
29 #include "chrome/browser/history/in_memory_url_index.h" 29 #include "chrome/browser/history/in_memory_url_index.h"
30 #include "chrome/browser/history/url_database.h"
31 #include "chrome/browser/history/url_index_private_data.h" 30 #include "chrome/browser/history/url_index_private_data.h"
32 #include "chrome/browser/search_engines/template_url_service.h" 31 #include "chrome/browser/search_engines/template_url_service.h"
33 #include "chrome/browser/search_engines/template_url_service_factory.h" 32 #include "chrome/browser/search_engines/template_url_service_factory.h"
34 #include "chrome/common/pref_names.h" 33 #include "chrome/common/pref_names.h"
35 #include "chrome/test/base/testing_browser_process.h" 34 #include "chrome/test/base/testing_browser_process.h"
36 #include "chrome/test/base/testing_profile.h" 35 #include "chrome/test/base/testing_profile.h"
37 #include "components/bookmarks/test/bookmark_test_helpers.h" 36 #include "components/bookmarks/test/bookmark_test_helpers.h"
37 #include "components/history/core/browser/url_database.h"
38 #include "components/metrics/proto/omnibox_event.pb.h" 38 #include "components/metrics/proto/omnibox_event.pb.h"
39 #include "components/search_engines/template_url.h" 39 #include "components/search_engines/template_url.h"
40 #include "content/public/browser/notification_service.h" 40 #include "content/public/browser/notification_service.h"
41 #include "content/public/test/test_browser_thread.h" 41 #include "content/public/test/test_browser_thread.h"
42 #include "content/public/test/test_utils.h" 42 #include "content/public/test/test_utils.h"
43 #include "sql/transaction.h" 43 #include "sql/transaction.h"
44 #include "testing/gtest/include/gtest/gtest.h" 44 #include "testing/gtest/include/gtest/gtest.h"
45 45
46 using base::ASCIIToUTF16; 46 using base::ASCIIToUTF16;
47 using base::Time; 47 using base::Time;
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 732
733 TEST_F(HQPOrderingTest, TEAMatch) { 733 TEST_F(HQPOrderingTest, TEAMatch) {
734 std::vector<std::string> expected_urls; 734 std::vector<std::string> expected_urls;
735 expected_urls.push_back("http://www.teamliquid.net/"); 735 expected_urls.push_back("http://www.teamliquid.net/");
736 expected_urls.push_back("http://www.teamliquid.net/tlpd"); 736 expected_urls.push_back("http://www.teamliquid.net/tlpd");
737 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); 737 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players");
738 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, 738 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true,
739 ASCIIToUTF16("www.teamliquid.net"), 739 ASCIIToUTF16("www.teamliquid.net"),
740 ASCIIToUTF16("mliquid.net")); 740 ASCIIToUTF16("mliquid.net"));
741 } 741 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698