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 "base/strings/string_util.h" | 5 #include "base/strings/string_util.h" |
6 #include "chrome/browser/chrome_notification_types.h" | 6 #include "chrome/browser/chrome_notification_types.h" |
7 #include "chrome/browser/search/instant_service.h" | 7 #include "chrome/browser/search/instant_service.h" |
8 #include "chrome/browser/search/instant_service_factory.h" | 8 #include "chrome/browser/search/instant_service_factory.h" |
9 #include "chrome/browser/search/search.h" | 9 #include "chrome/browser/search/search.h" |
10 #include "chrome/browser/task_manager/task_manager.h" | 10 #include "chrome/browser/task_manager/task_manager.h" |
11 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" | 11 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/browser_commands.h" | 13 #include "chrome/browser/ui/browser_commands.h" |
14 #include "chrome/browser/ui/host_desktop.h" | |
15 #include "chrome/browser/ui/search/instant_test_utils.h" | 14 #include "chrome/browser/ui/search/instant_test_utils.h" |
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
17 #include "chrome/common/search_types.h" | 16 #include "chrome/common/search_types.h" |
18 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
19 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
20 #include "chrome/test/base/interactive_test_utils.h" | 19 #include "chrome/test/base/interactive_test_utils.h" |
21 #include "chrome/test/base/ui_test_utils.h" | 20 #include "chrome/test/base/ui_test_utils.h" |
22 #include "components/omnibox/browser/omnibox_view.h" | 21 #include "components/omnibox/browser/omnibox_view.h" |
23 #include "components/omnibox/common/omnibox_focus_state.h" | 22 #include "components/omnibox/common/omnibox_focus_state.h" |
24 #include "components/search/search.h" | 23 #include "components/search/search.h" |
25 #include "content/public/browser/navigation_controller.h" | 24 #include "content/public/browser/navigation_controller.h" |
26 #include "content/public/browser/navigation_entry.h" | 25 #include "content/public/browser/navigation_entry.h" |
27 #include "content/public/browser/notification_service.h" | 26 #include "content/public/browser/notification_service.h" |
28 #include "content/public/browser/render_process_host.h" | 27 #include "content/public/browser/render_process_host.h" |
29 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
30 #include "content/public/test/browser_test_utils.h" | 29 #include "content/public/test/browser_test_utils.h" |
31 #include "net/base/network_change_notifier.h" | 30 #include "net/base/network_change_notifier.h" |
32 #include "net/dns/mock_host_resolver.h" | 31 #include "net/dns/mock_host_resolver.h" |
| 32 #include "ui/gfx/host_desktop_type.h" |
33 #include "url/gurl.h" | 33 #include "url/gurl.h" |
34 | 34 |
35 // !!! IMPORTANT !!! | 35 // !!! IMPORTANT !!! |
36 // These tests are run against a mock GWS using the web-page-replay system. | 36 // These tests are run against a mock GWS using the web-page-replay system. |
37 // If you change a test, you MUST re-record the mock GWS session. | 37 // If you change a test, you MUST re-record the mock GWS session. |
38 // See: src/chrome/test/data/search/tools/instant_extended_manual_tests.py | 38 // See: src/chrome/test/data/search/tools/instant_extended_manual_tests.py |
39 // for details. | 39 // for details. |
40 | 40 |
41 // Instant extended tests that need to be run manually because they need to | 41 // Instant extended tests that need to be run manually because they need to |
42 // talk to the external network. All tests in this file should be marked as | 42 // talk to the external network. All tests in this file should be marked as |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 EXPECT_EQ("test", GetOmniboxText()); | 141 EXPECT_EQ("test", GetOmniboxText()); |
142 EXPECT_EQ(OMNIBOX_FOCUS_VISIBLE, omnibox()->model()->focus_state()); | 142 EXPECT_EQ(OMNIBOX_FOCUS_VISIBLE, omnibox()->model()->focus_state()); |
143 | 143 |
144 // Pressing enter should search for [test]. | 144 // Pressing enter should search for [test]. |
145 const base::string16& search_title = | 145 const base::string16& search_title = |
146 base::ASCIIToUTF16("test - Google Search"); | 146 base::ASCIIToUTF16("test - Google Search"); |
147 content::TitleWatcher title_watcher(active_tab, search_title); | 147 content::TitleWatcher title_watcher(active_tab, search_title); |
148 PressEnterAndWaitForNavigation(); | 148 PressEnterAndWaitForNavigation(); |
149 EXPECT_EQ(search_title, title_watcher.WaitAndGetTitle()); | 149 EXPECT_EQ(search_title, title_watcher.WaitAndGetTitle()); |
150 } | 150 } |
OLD | NEW |