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" |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "chrome/browser/ui/browser_list.h" | 37 #include "chrome/browser/ui/browser_list.h" |
38 #include "chrome/browser/ui/browser_tabstrip.h" | 38 #include "chrome/browser/ui/browser_tabstrip.h" |
39 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 39 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
40 #include "chrome/browser/ui/search/instant_tab.h" | 40 #include "chrome/browser/ui/search/instant_tab.h" |
41 #include "chrome/browser/ui/search/instant_test_utils.h" | 41 #include "chrome/browser/ui/search/instant_test_utils.h" |
42 #include "chrome/browser/ui/search/search_tab_helper.h" | 42 #include "chrome/browser/ui/search/search_tab_helper.h" |
43 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 43 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
44 #include "chrome/browser/ui/webui/theme_source.h" | 44 #include "chrome/browser/ui/webui/theme_source.h" |
45 #include "chrome/common/chrome_switches.h" | 45 #include "chrome/common/chrome_switches.h" |
46 #include "chrome/common/instant_types.h" | 46 #include "chrome/common/instant_types.h" |
47 #include "chrome/common/pref_names.h" | |
48 #include "chrome/common/url_constants.h" | 47 #include "chrome/common/url_constants.h" |
49 #include "chrome/test/base/in_process_browser_test.h" | 48 #include "chrome/test/base/in_process_browser_test.h" |
50 #include "chrome/test/base/interactive_test_utils.h" | 49 #include "chrome/test/base/interactive_test_utils.h" |
51 #include "chrome/test/base/ui_test_utils.h" | 50 #include "chrome/test/base/ui_test_utils.h" |
52 #include "components/bookmarks/browser/bookmark_utils.h" | 51 #include "components/bookmarks/browser/bookmark_utils.h" |
53 #include "components/bookmarks/test/bookmark_test_helpers.h" | 52 #include "components/bookmarks/test/bookmark_test_helpers.h" |
54 #include "components/google/core/browser/google_url_tracker.h" | 53 #include "components/google/core/browser/google_url_tracker.h" |
55 #include "components/history/core/browser/history_types.h" | 54 #include "components/history/core/browser/history_types.h" |
56 #include "components/history/core/common/thumbnail_score.h" | 55 #include "components/history/core/common/thumbnail_score.h" |
57 #include "components/omnibox/autocomplete_match.h" | 56 #include "components/omnibox/autocomplete_match.h" |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 stream << "link.href = \"" << result_url.spec() << "\";"; | 969 stream << "link.href = \"" << result_url.spec() << "\";"; |
971 stream << "document.body.appendChild(link);"; | 970 stream << "document.body.appendChild(link);"; |
972 stream << "link.click();"; | 971 stream << "link.click();"; |
973 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); | 972 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); |
974 | 973 |
975 content::WaitForLoadStop(contents); | 974 content::WaitForLoadStop(contents); |
976 std::string expected_title = | 975 std::string expected_title = |
977 "Referrer is " + instant_url().GetWithEmptyPath().spec(); | 976 "Referrer is " + instant_url().GetWithEmptyPath().spec(); |
978 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); | 977 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); |
979 } | 978 } |
OLD | NEW |