OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/content_settings/host_content_settings_map.h" | 5 #include "chrome/browser/content_settings/host_content_settings_map.h" |
6 #include "chrome/browser/history/history_service_factory.h" | 6 #include "chrome/browser/history/history_service_factory.h" |
7 #include "chrome/browser/instant/instant_loader.h" | 7 #include "chrome/browser/instant/instant_overlay.h" |
8 #include "chrome/browser/instant/instant_service.h" | 8 #include "chrome/browser/instant/instant_service.h" |
9 #include "chrome/browser/instant/instant_service_factory.h" | 9 #include "chrome/browser/instant/instant_service_factory.h" |
10 #include "chrome/browser/instant/instant_test_utils.h" | 10 #include "chrome/browser/instant/instant_test_utils.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/search_engines/template_url_service.h" | 12 #include "chrome/browser/search_engines/template_url_service.h" |
13 #include "chrome/browser/search_engines/template_url_service_factory.h" | 13 #include "chrome/browser/search_engines/template_url_service_factory.h" |
14 #include "chrome/browser/task_manager/task_manager.h" | 14 #include "chrome/browser/task_manager/task_manager.h" |
15 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" | 15 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" |
16 #include "chrome/browser/ui/browser_commands.h" | 16 #include "chrome/browser/ui/browser_commands.h" |
17 #include "chrome/browser/ui/browser_tabstrip.h" | 17 #include "chrome/browser/ui/browser_tabstrip.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 ASSERT_NO_FATAL_FAILURE(SetupInstant()); | 58 ASSERT_NO_FATAL_FAILURE(SetupInstant()); |
59 | 59 |
60 // Explicitly unfocus the omnibox. | 60 // Explicitly unfocus the omnibox. |
61 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 61 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
62 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); | 62 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); |
63 | 63 |
64 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER)); | 64 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER)); |
65 EXPECT_FALSE(omnibox()->model()->has_focus()); | 65 EXPECT_FALSE(omnibox()->model()->has_focus()); |
66 | 66 |
67 // Delete any existing preview. | 67 // Delete any existing preview. |
68 instant()->loader_.reset(); | 68 instant()->overlay_.reset(); |
69 EXPECT_FALSE(instant()->GetPreviewContents()); | 69 EXPECT_FALSE(instant()->GetPreviewContents()); |
70 | 70 |
71 // Refocus the omnibox. The InstantController should've preloaded Instant. | 71 // Refocus the omnibox. The InstantController should've preloaded Instant. |
72 FocusOmniboxAndWaitForInstantSupport(); | 72 FocusOmniboxAndWaitForInstantSupport(); |
73 | 73 |
74 EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER)); | 74 EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER)); |
75 EXPECT_TRUE(omnibox()->model()->has_focus()); | 75 EXPECT_TRUE(omnibox()->model()->has_focus()); |
76 | 76 |
77 content::WebContents* preview_tab = instant()->GetPreviewContents(); | 77 content::WebContents* preview_tab = instant()->GetPreviewContents(); |
78 EXPECT_TRUE(preview_tab); | 78 EXPECT_TRUE(preview_tab); |
79 | 79 |
80 // Check that the page supports Instant, but it isn't showing. | 80 // Check that the page supports Instant, but it isn't showing. |
81 EXPECT_TRUE(instant()->loader_->supports_instant()); | 81 EXPECT_TRUE(instant()->overlay_->supports_instant()); |
82 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); | 82 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); |
83 EXPECT_TRUE(instant()->model()->mode().is_default()); | 83 EXPECT_TRUE(instant()->model()->mode().is_default()); |
84 | 84 |
85 // Adding a new tab shouldn't delete or recreate the preview; otherwise, | 85 // Adding a new tab shouldn't delete or recreate the preview; otherwise, |
86 // what's the point of preloading? | 86 // what's the point of preloading? |
87 AddBlankTabAndShow(browser()); | 87 AddBlankTabAndShow(browser()); |
88 EXPECT_EQ(preview_tab, instant()->GetPreviewContents()); | 88 EXPECT_EQ(preview_tab, instant()->GetPreviewContents()); |
89 | 89 |
90 // Unfocusing and refocusing the omnibox should also preserve the preview. | 90 // Unfocusing and refocusing the omnibox should also preserve the preview. |
91 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); | 91 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); |
(...skipping 16 matching lines...) Expand all Loading... |
108 ASSERT_NO_FATAL_FAILURE(SetupInstantUsingTemplateURL()); | 108 ASSERT_NO_FATAL_FAILURE(SetupInstantUsingTemplateURL()); |
109 | 109 |
110 // Explicitly unfocus the omnibox. | 110 // Explicitly unfocus the omnibox. |
111 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 111 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
112 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); | 112 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); |
113 | 113 |
114 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER)); | 114 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER)); |
115 EXPECT_FALSE(omnibox()->model()->has_focus()); | 115 EXPECT_FALSE(omnibox()->model()->has_focus()); |
116 | 116 |
117 // Delete any existing preview. | 117 // Delete any existing preview. |
118 instant()->loader_.reset(); | 118 instant()->overlay_.reset(); |
119 EXPECT_FALSE(instant()->GetPreviewContents()); | 119 EXPECT_FALSE(instant()->GetPreviewContents()); |
120 | 120 |
121 // Refocus the omnibox. The InstantController should've preloaded Instant. | 121 // Refocus the omnibox. The InstantController should've preloaded Instant. |
122 FocusOmniboxAndWaitForInstantSupport(); | 122 FocusOmniboxAndWaitForInstantSupport(); |
123 | 123 |
124 EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER)); | 124 EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER)); |
125 EXPECT_TRUE(omnibox()->model()->has_focus()); | 125 EXPECT_TRUE(omnibox()->model()->has_focus()); |
126 | 126 |
127 content::WebContents* preview_tab = instant()->GetPreviewContents(); | 127 content::WebContents* preview_tab = instant()->GetPreviewContents(); |
128 EXPECT_TRUE(preview_tab); | 128 EXPECT_TRUE(preview_tab); |
129 | 129 |
130 // Check that the page supports Instant, but it isn't showing. | 130 // Check that the page supports Instant, but it isn't showing. |
131 EXPECT_TRUE(instant()->loader_->supports_instant()); | 131 EXPECT_TRUE(instant()->overlay_->supports_instant()); |
132 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); | 132 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); |
133 EXPECT_TRUE(instant()->model()->mode().is_default()); | 133 EXPECT_TRUE(instant()->model()->mode().is_default()); |
134 } | 134 } |
135 | 135 |
136 // Flakes on Windows and Mac: http://crbug.com/170677 | 136 // Flakes on Windows and Mac: http://crbug.com/170677 |
137 #if defined(OS_WIN) || defined(OS_MACOSX) | 137 #if defined(OS_WIN) || defined(OS_MACOSX) |
138 #define MAYBE_OnChangeEvent DISABLED_OnChangeEvent | 138 #define MAYBE_OnChangeEvent DISABLED_OnChangeEvent |
139 #else | 139 #else |
140 #define MAYBE_OnChangeEvent OnChangeEvent | 140 #define MAYBE_OnChangeEvent OnChangeEvent |
141 #endif | 141 #endif |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 EXPECT_EQ(std::string(chrome::kAboutBlankURL), | 205 EXPECT_EQ(std::string(chrome::kAboutBlankURL), |
206 omnibox()->model()->PermanentURL().spec()); | 206 omnibox()->model()->PermanentURL().spec()); |
207 | 207 |
208 // Commit the search by pressing Enter. | 208 // Commit the search by pressing Enter. |
209 browser()->window()->GetLocationBar()->AcceptInput(); | 209 browser()->window()->GetLocationBar()->AcceptInput(); |
210 | 210 |
211 // After the commit, Instant should not be showing. | 211 // After the commit, Instant should not be showing. |
212 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); | 212 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); |
213 EXPECT_TRUE(instant()->model()->mode().is_default()); | 213 EXPECT_TRUE(instant()->model()->mode().is_default()); |
214 | 214 |
215 // The old loader is deleted and a new one is created. | 215 // The old overlay is deleted and a new one is created. |
216 EXPECT_TRUE(instant()->GetPreviewContents()); | 216 EXPECT_TRUE(instant()->GetPreviewContents()); |
217 EXPECT_NE(instant()->GetPreviewContents(), preview_tab); | 217 EXPECT_NE(instant()->GetPreviewContents(), preview_tab); |
218 | 218 |
219 // Check that the current active tab is indeed what was once the preview. | 219 // Check that the current active tab is indeed what was once the preview. |
220 EXPECT_EQ(preview_tab, browser()->tab_strip_model()->GetActiveWebContents()); | 220 EXPECT_EQ(preview_tab, browser()->tab_strip_model()->GetActiveWebContents()); |
221 | 221 |
222 // We should have two navigation entries, one for the NTP, and one for the | 222 // We should have two navigation entries, one for the NTP, and one for the |
223 // Instant search that was committed. | 223 // Instant search that was committed. |
224 EXPECT_EQ(2, preview_tab->GetController().GetEntryCount()); | 224 EXPECT_EQ(2, preview_tab->GetController().GetEntryCount()); |
225 | 225 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 EXPECT_EQ(std::string(chrome::kAboutBlankURL), | 265 EXPECT_EQ(std::string(chrome::kAboutBlankURL), |
266 omnibox()->model()->PermanentURL().spec()); | 266 omnibox()->model()->PermanentURL().spec()); |
267 | 267 |
268 // Commit the search by clicking on the preview. | 268 // Commit the search by clicking on the preview. |
269 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); | 269 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); |
270 | 270 |
271 // After the commit, Instant should not be showing. | 271 // After the commit, Instant should not be showing. |
272 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); | 272 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); |
273 EXPECT_TRUE(instant()->model()->mode().is_default()); | 273 EXPECT_TRUE(instant()->model()->mode().is_default()); |
274 | 274 |
275 // The old loader is deleted and a new one is created. | 275 // The old overlay is deleted and a new one is created. |
276 EXPECT_TRUE(instant()->GetPreviewContents()); | 276 EXPECT_TRUE(instant()->GetPreviewContents()); |
277 EXPECT_NE(instant()->GetPreviewContents(), preview_tab); | 277 EXPECT_NE(instant()->GetPreviewContents(), preview_tab); |
278 | 278 |
279 // Check that the current active tab is indeed what was once the preview. | 279 // Check that the current active tab is indeed what was once the preview. |
280 EXPECT_EQ(preview_tab, browser()->tab_strip_model()->GetActiveWebContents()); | 280 EXPECT_EQ(preview_tab, browser()->tab_strip_model()->GetActiveWebContents()); |
281 | 281 |
282 // We should have two navigation entries, one for the NTP, and one for the | 282 // We should have two navigation entries, one for the NTP, and one for the |
283 // Instant search that was committed. | 283 // Instant search that was committed. |
284 EXPECT_EQ(2, preview_tab->GetController().GetEntryCount()); | 284 EXPECT_EQ(2, preview_tab->GetController().GetEntryCount()); |
285 | 285 |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 chrome::NewEmptyWindow(browser()->profile()); | 769 chrome::NewEmptyWindow(browser()->profile()); |
770 observer.WaitUntilDesiredPreviewState(); | 770 observer.WaitUntilDesiredPreviewState(); |
771 | 771 |
772 // Even though we just created a new Browser object (for the new window), the | 772 // Even though we just created a new Browser object (for the new window), the |
773 // browser() accessor should still give us the first window's Browser object. | 773 // browser() accessor should still give us the first window's Browser object. |
774 EXPECT_EQ(previous_window, browser()); | 774 EXPECT_EQ(previous_window, browser()); |
775 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); | 775 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); |
776 EXPECT_TRUE(instant()->model()->mode().is_default()); | 776 EXPECT_TRUE(instant()->model()->mode().is_default()); |
777 } | 777 } |
778 | 778 |
779 // Test that the Instant loader is recreated when all these conditions are met: | 779 // Test that the Instant overlay is recreated when all these conditions are met: |
780 // - The stale loader timer has fired. | 780 // - The stale overlay timer has fired. |
781 // - The preview is not showing. | 781 // - The preview is not showing. |
782 // - The omnibox doesn't have focus. | 782 // - The omnibox doesn't have focus. |
783 IN_PROC_BROWSER_TEST_F(InstantTest, InstantLoaderRefresh) { | 783 IN_PROC_BROWSER_TEST_F(InstantTest, InstantOverlayRefresh) { |
784 ASSERT_NO_FATAL_FAILURE(SetupInstant()); | 784 ASSERT_NO_FATAL_FAILURE(SetupInstant()); |
785 FocusOmniboxAndWaitForInstantSupport(); | 785 FocusOmniboxAndWaitForInstantSupport(); |
786 | 786 |
787 // The preview is refreshed only after all three conditions above are met. | 787 // The preview is refreshed only after all three conditions above are met. |
788 SetOmniboxTextAndWaitForInstantToShow("query"); | 788 SetOmniboxTextAndWaitForInstantToShow("query"); |
789 instant()->stale_loader_timer_.Stop(); | 789 instant()->overlay_->is_stale_ = true; |
790 instant()->OnStaleLoader(); | 790 instant()->HandleStaleOverlay(); |
791 EXPECT_TRUE(instant()->loader_->supports_instant()); | 791 EXPECT_TRUE(instant()->overlay_->supports_instant()); |
792 instant()->HideLoader(); | 792 instant()->HideOverlay(); |
793 EXPECT_TRUE(instant()->loader_->supports_instant()); | 793 EXPECT_TRUE(instant()->overlay_->supports_instant()); |
794 instant()->OmniboxFocusChanged(OMNIBOX_FOCUS_NONE, | 794 instant()->OmniboxFocusChanged(OMNIBOX_FOCUS_NONE, |
795 OMNIBOX_FOCUS_CHANGE_EXPLICIT, NULL); | 795 OMNIBOX_FOCUS_CHANGE_EXPLICIT, NULL); |
796 EXPECT_FALSE(instant()->loader_->supports_instant()); | 796 EXPECT_FALSE(instant()->overlay_->supports_instant()); |
797 | 797 |
798 // Try with a different ordering. | 798 // Try with a different ordering. |
799 SetOmniboxTextAndWaitForInstantToShow("query"); | 799 SetOmniboxTextAndWaitForInstantToShow("query"); |
800 instant()->stale_loader_timer_.Stop(); | 800 instant()->overlay_->is_stale_ = true; |
801 instant()->OnStaleLoader(); | 801 instant()->HandleStaleOverlay(); |
802 EXPECT_TRUE(instant()->loader_->supports_instant()); | 802 EXPECT_TRUE(instant()->overlay_->supports_instant()); |
803 instant()->OmniboxFocusChanged(OMNIBOX_FOCUS_NONE, | 803 instant()->OmniboxFocusChanged(OMNIBOX_FOCUS_NONE, |
804 OMNIBOX_FOCUS_CHANGE_EXPLICIT, NULL); | 804 OMNIBOX_FOCUS_CHANGE_EXPLICIT, NULL); |
805 // TODO(sreeram): Currently, OmniboxLostFocus() calls HideLoader(). When it | 805 // TODO(sreeram): Currently, OmniboxLostFocus() calls HideOverlay(). When it |
806 // stops hiding the preview eventually, uncomment these two lines: | 806 // stops hiding the preview eventually, uncomment these two lines: |
807 // EXPECT_TRUE(instant()->loader_->supports_instant()); | 807 // EXPECT_TRUE(instant()->overlay_->supports_instant()); |
808 // instant()->HideLoader(); | 808 // instant()->HideOverlay(); |
809 EXPECT_FALSE(instant()->loader_->supports_instant()); | 809 EXPECT_FALSE(instant()->overlay_->supports_instant()); |
810 } | 810 } |
811 | 811 |
812 // Test that suggestions are case insensitive. http://crbug.com/150728 | 812 // Test that suggestions are case insensitive. http://crbug.com/150728 |
813 IN_PROC_BROWSER_TEST_F(InstantTest, SuggestionsAreCaseInsensitive) { | 813 IN_PROC_BROWSER_TEST_F(InstantTest, SuggestionsAreCaseInsensitive) { |
814 ASSERT_NO_FATAL_FAILURE(SetupInstant()); | 814 ASSERT_NO_FATAL_FAILURE(SetupInstant()); |
815 FocusOmniboxAndWaitForInstantSupport(); | 815 FocusOmniboxAndWaitForInstantSupport(); |
816 | 816 |
817 EXPECT_TRUE(ExecuteScript("suggestion = [ { value: 'INSTANT' } ]")); | 817 EXPECT_TRUE(ExecuteScript("suggestion = [ { value: 'INSTANT' } ]")); |
818 | 818 |
819 SetOmniboxTextAndWaitForInstantToShow("in"); | 819 SetOmniboxTextAndWaitForInstantToShow("in"); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 &active_tab_onvisibilitycalls)); | 909 &active_tab_onvisibilitycalls)); |
910 EXPECT_EQ(0, active_tab_onvisibilitycalls); | 910 EXPECT_EQ(0, active_tab_onvisibilitycalls); |
911 | 911 |
912 // Commit the search by pressing Alt-Enter. | 912 // Commit the search by pressing Alt-Enter. |
913 omnibox()->model()->AcceptInput(NEW_FOREGROUND_TAB, false); | 913 omnibox()->model()->AcceptInput(NEW_FOREGROUND_TAB, false); |
914 | 914 |
915 // After the commit, Instant should not be showing. | 915 // After the commit, Instant should not be showing. |
916 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); | 916 EXPECT_FALSE(instant()->IsPreviewingSearchResults()); |
917 EXPECT_TRUE(instant()->model()->mode().is_default()); | 917 EXPECT_TRUE(instant()->model()->mode().is_default()); |
918 | 918 |
919 // The old loader is deleted and a new one is created. | 919 // The old overlay is deleted and a new one is created. |
920 EXPECT_TRUE(instant()->GetPreviewContents()); | 920 EXPECT_TRUE(instant()->GetPreviewContents()); |
921 EXPECT_NE(instant()->GetPreviewContents(), preview_tab); | 921 EXPECT_NE(instant()->GetPreviewContents(), preview_tab); |
922 | 922 |
923 // Check that we have two tabs and that the new active tab is indeed what was | 923 // Check that we have two tabs and that the new active tab is indeed what was |
924 // once the preview. The preview tab should have just one navigation entry, | 924 // once the preview. The preview tab should have just one navigation entry, |
925 // for the Instant search that was committed. | 925 // for the Instant search that was committed. |
926 EXPECT_EQ(2, browser()->tab_strip_model()->count()); | 926 EXPECT_EQ(2, browser()->tab_strip_model()->count()); |
927 EXPECT_EQ(preview_tab, browser()->tab_strip_model()->GetActiveWebContents()); | 927 EXPECT_EQ(preview_tab, browser()->tab_strip_model()->GetActiveWebContents()); |
928 EXPECT_EQ(1, preview_tab->GetController().GetEntryCount()); | 928 EXPECT_EQ(1, preview_tab->GetController().GetEntryCount()); |
929 | 929 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 SetOmniboxText("ins"); | 963 SetOmniboxText("ins"); |
964 EXPECT_EQ(ASCIIToUTF16("tant"), omnibox()->GetInstantSuggestion()); | 964 EXPECT_EQ(ASCIIToUTF16("tant"), omnibox()->GetInstantSuggestion()); |
965 | 965 |
966 SetOmniboxText("in"); | 966 SetOmniboxText("in"); |
967 EXPECT_EQ(ASCIIToUTF16("stant"), omnibox()->GetInstantSuggestion()); | 967 EXPECT_EQ(ASCIIToUTF16("stant"), omnibox()->GetInstantSuggestion()); |
968 | 968 |
969 SetOmniboxText("insane"); | 969 SetOmniboxText("insane"); |
970 EXPECT_EQ(ASCIIToUTF16(""), omnibox()->GetInstantSuggestion()); | 970 EXPECT_EQ(ASCIIToUTF16(""), omnibox()->GetInstantSuggestion()); |
971 } | 971 } |
972 | 972 |
973 // Test that instant loader is recreated if it gets destroyed. | 973 // Test that instant overlay is recreated if it gets destroyed. |
974 IN_PROC_BROWSER_TEST_F(InstantTest, InstantRenderViewGone) { | 974 IN_PROC_BROWSER_TEST_F(InstantTest, InstantRenderViewGone) { |
975 ASSERT_NO_FATAL_FAILURE(SetupInstant()); | 975 ASSERT_NO_FATAL_FAILURE(SetupInstant()); |
976 FocusOmniboxAndWaitForInstantSupport(); | 976 FocusOmniboxAndWaitForInstantSupport(); |
977 | 977 |
978 // Type partial query, get suggestion to show. | 978 // Type partial query, get suggestion to show. |
979 SetOmniboxTextAndWaitForInstantToShow("q"); | 979 SetOmniboxTextAndWaitForInstantToShow("q"); |
980 EXPECT_EQ(ASCIIToUTF16("query suggestion"), omnibox()->GetText()); | 980 EXPECT_EQ(ASCIIToUTF16("query suggestion"), omnibox()->GetText()); |
981 | 981 |
982 // Kill the instant renderer and wait for instant support again. | 982 // Kill the instant renderer and wait for instant support again. |
983 KillInstantRenderView(); | 983 KillInstantRenderView(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 content::WebContents* active_tab = | 1015 content::WebContents* active_tab = |
1016 browser()->tab_strip_model()->GetActiveWebContents(); | 1016 browser()->tab_strip_model()->GetActiveWebContents(); |
1017 EXPECT_TRUE(instant_service->IsInstantProcess( | 1017 EXPECT_TRUE(instant_service->IsInstantProcess( |
1018 active_tab->GetRenderProcessHost()->GetID())); | 1018 active_tab->GetRenderProcessHost()->GetID())); |
1019 | 1019 |
1020 // Navigating away should change the process. | 1020 // Navigating away should change the process. |
1021 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL)); | 1021 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL)); |
1022 EXPECT_FALSE(instant_service->IsInstantProcess( | 1022 EXPECT_FALSE(instant_service->IsInstantProcess( |
1023 active_tab->GetRenderProcessHost()->GetID())); | 1023 active_tab->GetRenderProcessHost()->GetID())); |
1024 } | 1024 } |
OLD | NEW |