| 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" | |
| 19 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 18 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 20 #include "chrome/browser/chrome_notification_types.h" | 19 #include "chrome/browser/chrome_notification_types.h" |
| 21 #include "chrome/browser/extensions/extension_browsertest.h" | 20 #include "chrome/browser/extensions/extension_browsertest.h" |
| 22 #include "chrome/browser/extensions/extension_service.h" | 21 #include "chrome/browser/extensions/extension_service.h" |
| 23 #include "chrome/browser/history/history_service_factory.h" | 22 #include "chrome/browser/history/history_service_factory.h" |
| 24 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
| 25 #include "chrome/browser/search/instant_service.h" | 24 #include "chrome/browser/search/instant_service.h" |
| 26 #include "chrome/browser/search/instant_service_factory.h" | 25 #include "chrome/browser/search/instant_service_factory.h" |
| 27 #include "chrome/browser/search/search.h" | 26 #include "chrome/browser/search/search.h" |
| 28 #include "chrome/browser/search_engines/template_url_service_factory.h" | 27 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 44 #include "chrome/test/base/in_process_browser_test.h" | 43 #include "chrome/test/base/in_process_browser_test.h" |
| 45 #include "chrome/test/base/interactive_test_utils.h" | 44 #include "chrome/test/base/interactive_test_utils.h" |
| 46 #include "chrome/test/base/ui_test_utils.h" | 45 #include "chrome/test/base/ui_test_utils.h" |
| 47 #include "components/bookmarks/browser/bookmark_utils.h" | 46 #include "components/bookmarks/browser/bookmark_utils.h" |
| 48 #include "components/bookmarks/test/bookmark_test_helpers.h" | 47 #include "components/bookmarks/test/bookmark_test_helpers.h" |
| 49 #include "components/history/core/browser/history_db_task.h" | 48 #include "components/history/core/browser/history_db_task.h" |
| 50 #include "components/history/core/browser/history_service.h" | 49 #include "components/history/core/browser/history_service.h" |
| 51 #include "components/history/core/browser/history_types.h" | 50 #include "components/history/core/browser/history_types.h" |
| 52 #include "components/history/core/browser/top_sites.h" | 51 #include "components/history/core/browser/top_sites.h" |
| 53 #include "components/history/core/common/thumbnail_score.h" | 52 #include "components/history/core/common/thumbnail_score.h" |
| 53 #include "components/omnibox/autocomplete_controller.h" |
| 54 #include "components/omnibox/autocomplete_match.h" | 54 #include "components/omnibox/autocomplete_match.h" |
| 55 #include "components/omnibox/autocomplete_provider.h" | 55 #include "components/omnibox/autocomplete_provider.h" |
| 56 #include "components/omnibox/autocomplete_result.h" | 56 #include "components/omnibox/autocomplete_result.h" |
| 57 #include "components/omnibox/omnibox_field_trial.h" | 57 #include "components/omnibox/omnibox_field_trial.h" |
| 58 #include "components/omnibox/search_provider.h" | 58 #include "components/omnibox/search_provider.h" |
| 59 #include "components/search_engines/template_url_service.h" | 59 #include "components/search_engines/template_url_service.h" |
| 60 #include "components/sessions/serialized_navigation_entry.h" | 60 #include "components/sessions/serialized_navigation_entry.h" |
| 61 #include "content/public/browser/navigation_controller.h" | 61 #include "content/public/browser/navigation_controller.h" |
| 62 #include "content/public/browser/navigation_entry.h" | 62 #include "content/public/browser/navigation_entry.h" |
| 63 #include "content/public/browser/notification_service.h" | 63 #include "content/public/browser/notification_service.h" |
| (...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 stream << "link.href = \"" << result_url.spec() << "\";"; | 967 stream << "link.href = \"" << result_url.spec() << "\";"; |
| 968 stream << "document.body.appendChild(link);"; | 968 stream << "document.body.appendChild(link);"; |
| 969 stream << "link.click();"; | 969 stream << "link.click();"; |
| 970 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); | 970 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); |
| 971 | 971 |
| 972 content::WaitForLoadStop(contents); | 972 content::WaitForLoadStop(contents); |
| 973 std::string expected_title = | 973 std::string expected_title = |
| 974 "Referrer is " + instant_url().GetWithEmptyPath().spec(); | 974 "Referrer is " + instant_url().GetWithEmptyPath().spec(); |
| 975 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); | 975 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); |
| 976 } | 976 } |
| OLD | NEW |