OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram_base.h" | 8 #include "base/metrics/histogram_base.h" |
9 #include "base/metrics/histogram_samples.h" | 9 #include "base/metrics/histogram_samples.h" |
10 #include "base/metrics/statistics_recorder.h" | 10 #include "base/metrics/statistics_recorder.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "chrome/browser/autocomplete/autocomplete_controller.h" | 18 #include "chrome/browser/autocomplete/autocomplete_controller.h" |
19 #include "chrome/browser/autocomplete/autocomplete_match.h" | 19 #include "chrome/browser/autocomplete/autocomplete_match.h" |
20 #include "chrome/browser/autocomplete/autocomplete_provider.h" | 20 #include "chrome/browser/autocomplete/autocomplete_provider.h" |
21 #include "chrome/browser/autocomplete/autocomplete_result.h" | 21 #include "chrome/browser/autocomplete/autocomplete_result.h" |
22 #include "chrome/browser/autocomplete/search_provider.h" | 22 #include "chrome/browser/autocomplete/search_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/extensions/extension_browsertest.h" | 25 #include "chrome/browser/extensions/extension_browsertest.h" |
26 #include "chrome/browser/extensions/extension_service.h" | 26 #include "chrome/browser/extensions/extension_service.h" |
27 #include "chrome/browser/favicon/favicon_tab_helper.h" | 27 #include "chrome/browser/favicon/favicon_tab_helper.h" |
28 #include "chrome/browser/google/google_url_tracker.h" | |
29 #include "chrome/browser/history/history_db_task.h" | 28 #include "chrome/browser/history/history_db_task.h" |
30 #include "chrome/browser/history/history_service.h" | 29 #include "chrome/browser/history/history_service.h" |
31 #include "chrome/browser/history/history_service_factory.h" | 30 #include "chrome/browser/history/history_service_factory.h" |
32 #include "chrome/browser/history/history_types.h" | 31 #include "chrome/browser/history/history_types.h" |
33 #include "chrome/browser/history/top_sites.h" | 32 #include "chrome/browser/history/top_sites.h" |
34 #include "chrome/browser/profiles/profile.h" | 33 #include "chrome/browser/profiles/profile.h" |
35 #include "chrome/browser/search/instant_service.h" | 34 #include "chrome/browser/search/instant_service.h" |
36 #include "chrome/browser/search/instant_service_factory.h" | 35 #include "chrome/browser/search/instant_service_factory.h" |
37 #include "chrome/browser/search/search.h" | 36 #include "chrome/browser/search/search.h" |
38 #include "chrome/browser/search_engines/template_url_service.h" | 37 #include "chrome/browser/search_engines/template_url_service.h" |
(...skipping 13 matching lines...) Expand all Loading... |
52 #include "chrome/common/chrome_switches.h" | 51 #include "chrome/common/chrome_switches.h" |
53 #include "chrome/common/instant_types.h" | 52 #include "chrome/common/instant_types.h" |
54 #include "chrome/common/pref_names.h" | 53 #include "chrome/common/pref_names.h" |
55 #include "chrome/common/thumbnail_score.h" | 54 #include "chrome/common/thumbnail_score.h" |
56 #include "chrome/common/url_constants.h" | 55 #include "chrome/common/url_constants.h" |
57 #include "chrome/test/base/in_process_browser_test.h" | 56 #include "chrome/test/base/in_process_browser_test.h" |
58 #include "chrome/test/base/interactive_test_utils.h" | 57 #include "chrome/test/base/interactive_test_utils.h" |
59 #include "chrome/test/base/ui_test_utils.h" | 58 #include "chrome/test/base/ui_test_utils.h" |
60 #include "components/bookmarks/browser/bookmark_utils.h" | 59 #include "components/bookmarks/browser/bookmark_utils.h" |
61 #include "components/bookmarks/test/bookmark_test_helpers.h" | 60 #include "components/bookmarks/test/bookmark_test_helpers.h" |
| 61 #include "components/google/core/browser/google_url_tracker.h" |
62 #include "components/sessions/serialized_navigation_entry.h" | 62 #include "components/sessions/serialized_navigation_entry.h" |
63 #include "content/public/browser/navigation_controller.h" | 63 #include "content/public/browser/navigation_controller.h" |
64 #include "content/public/browser/navigation_entry.h" | 64 #include "content/public/browser/navigation_entry.h" |
65 #include "content/public/browser/notification_service.h" | 65 #include "content/public/browser/notification_service.h" |
66 #include "content/public/browser/render_process_host.h" | 66 #include "content/public/browser/render_process_host.h" |
67 #include "content/public/browser/render_view_host.h" | 67 #include "content/public/browser/render_view_host.h" |
68 #include "content/public/browser/site_instance.h" | 68 #include "content/public/browser/site_instance.h" |
69 #include "content/public/browser/url_data_source.h" | 69 #include "content/public/browser/url_data_source.h" |
70 #include "content/public/browser/web_contents.h" | 70 #include "content/public/browser/web_contents.h" |
71 #include "content/public/common/bindings_policy.h" | 71 #include "content/public/common/bindings_policy.h" |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 stream << "link.href = \"" << result_url.spec() << "\";"; | 972 stream << "link.href = \"" << result_url.spec() << "\";"; |
973 stream << "document.body.appendChild(link);"; | 973 stream << "document.body.appendChild(link);"; |
974 stream << "link.click();"; | 974 stream << "link.click();"; |
975 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); | 975 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); |
976 | 976 |
977 content::WaitForLoadStop(contents); | 977 content::WaitForLoadStop(contents); |
978 std::string expected_title = | 978 std::string expected_title = |
979 "Referrer is " + instant_url().GetWithEmptyPath().spec(); | 979 "Referrer is " + instant_url().GetWithEmptyPath().spec(); |
980 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); | 980 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); |
981 } | 981 } |
OLD | NEW |