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 "chrome/browser/ui/search/search_tab_helper.h" | 5 #include "chrome/browser/ui/search/search_tab_helper.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "chrome/common/ntp_logging_events.h" | 29 #include "chrome/common/ntp_logging_events.h" |
30 #include "chrome/common/render_messages.h" | 30 #include "chrome/common/render_messages.h" |
31 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
32 #include "chrome/grit/generated_resources.h" | 32 #include "chrome/grit/generated_resources.h" |
33 #include "chrome/test/base/browser_with_test_window_test.h" | 33 #include "chrome/test/base/browser_with_test_window_test.h" |
34 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 34 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
35 #include "chrome/test/base/testing_profile.h" | 35 #include "chrome/test/base/testing_profile.h" |
36 #include "components/browser_sync/browser/profile_sync_service.h" | 36 #include "components/browser_sync/browser/profile_sync_service.h" |
37 #include "components/omnibox/common/omnibox_focus_state.h" | 37 #include "components/omnibox/common/omnibox_focus_state.h" |
38 #include "components/search_engines/template_url_service.h" | 38 #include "components/search_engines/template_url_service.h" |
| 39 #include "components/strings/grit/components_strings.h" |
39 #include "content/public/browser/navigation_controller.h" | 40 #include "content/public/browser/navigation_controller.h" |
40 #include "content/public/browser/navigation_entry.h" | 41 #include "content/public/browser/navigation_entry.h" |
41 #include "content/public/browser/web_contents.h" | 42 #include "content/public/browser/web_contents.h" |
42 #include "content/public/test/mock_render_process_host.h" | 43 #include "content/public/test/mock_render_process_host.h" |
43 #include "ipc/ipc_message.h" | 44 #include "ipc/ipc_message.h" |
44 #include "ipc/ipc_test_sink.h" | 45 #include "ipc/ipc_test_sink.h" |
45 #include "net/base/net_errors.h" | 46 #include "net/base/net_errors.h" |
46 #include "testing/gmock/include/gmock/gmock.h" | 47 #include "testing/gmock/include/gmock/gmock.h" |
47 #include "testing/gtest/include/gtest/gtest.h" | 48 #include "testing/gtest/include/gtest/gtest.h" |
48 #include "ui/base/l10n/l10n_util.h" | 49 #include "ui/base/l10n/l10n_util.h" |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 } | 453 } |
453 | 454 |
454 TEST_F(SearchTabHelperPrerenderTest, | 455 TEST_F(SearchTabHelperPrerenderTest, |
455 OnTabActivatedNoPrerenderIfOmniboxBlurred) { | 456 OnTabActivatedNoPrerenderIfOmniboxBlurred) { |
456 SearchTabHelperPrerenderTest::omnibox_has_focus_ = false; | 457 SearchTabHelperPrerenderTest::omnibox_has_focus_ = false; |
457 SearchTabHelper* search_tab_helper = | 458 SearchTabHelper* search_tab_helper = |
458 SearchTabHelper::FromWebContents(web_contents()); | 459 SearchTabHelper::FromWebContents(web_contents()); |
459 search_tab_helper->OnTabActivated(); | 460 search_tab_helper->OnTabActivated(); |
460 ASSERT_FALSE(IsInstantURLMarkedForPrerendering()); | 461 ASSERT_FALSE(IsInstantURLMarkedForPrerendering()); |
461 } | 462 } |
OLD | NEW |