Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/search/instant_service.h" 9 #include "chrome/browser/search/instant_service.h"
10 #include "chrome/browser/search/instant_service_factory.h" 10 #include "chrome/browser/search/instant_service_factory.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 IN_PROC_BROWSER_TEST_F(InstantExtendedManualTest, MANUAL_SearchesFromFakebox) { 94 IN_PROC_BROWSER_TEST_F(InstantExtendedManualTest, MANUAL_SearchesFromFakebox) {
95 set_browser(browser()); 95 set_browser(browser());
96 96
97 FocusOmnibox(); 97 FocusOmnibox();
98 // Open a new tab page. 98 // Open a new tab page.
99 content::WindowedNotificationObserver observer( 99 content::WindowedNotificationObserver observer(
100 content::NOTIFICATION_NAV_ENTRY_COMMITTED, 100 content::NOTIFICATION_NAV_ENTRY_COMMITTED,
101 content::NotificationService::AllSources()); 101 content::NotificationService::AllSources());
102 ui_test_utils::NavigateToURLWithDisposition( 102 ui_test_utils::NavigateToURLWithDisposition(
103 browser(), 103 browser(), GURL(chrome::kChromeUINewTabURL),
104 GURL(chrome::kChromeUINewTabURL), 104 WindowOpenDisposition::CURRENT_TAB, ui_test_utils::BROWSER_TEST_NONE);
105 CURRENT_TAB,
106 ui_test_utils::BROWSER_TEST_NONE);
107 observer.Wait(); 105 observer.Wait();
108 content::WebContents* active_tab = 106 content::WebContents* active_tab =
109 browser()->tab_strip_model()->GetActiveWebContents(); 107 browser()->tab_strip_model()->GetActiveWebContents();
110 ASSERT_TRUE(IsGooglePage(active_tab)); 108 ASSERT_TRUE(IsGooglePage(active_tab));
111 109
112 // Click in the fakebox and expect invisible focus. 110 // Click in the fakebox and expect invisible focus.
113 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER); 111 ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER);
114 bool fakebox_is_present = false; 112 bool fakebox_is_present = false;
115 content::WindowedNotificationObserver focus_observer( 113 content::WindowedNotificationObserver focus_observer(
116 chrome::NOTIFICATION_OMNIBOX_FOCUS_CHANGED, 114 chrome::NOTIFICATION_OMNIBOX_FOCUS_CHANGED,
(...skipping 20 matching lines...) Expand all
137 EXPECT_EQ("test", GetOmniboxText()); 135 EXPECT_EQ("test", GetOmniboxText());
138 EXPECT_EQ(OMNIBOX_FOCUS_VISIBLE, omnibox()->model()->focus_state()); 136 EXPECT_EQ(OMNIBOX_FOCUS_VISIBLE, omnibox()->model()->focus_state());
139 137
140 // Pressing enter should search for [test]. 138 // Pressing enter should search for [test].
141 const base::string16& search_title = 139 const base::string16& search_title =
142 base::ASCIIToUTF16("test - Google Search"); 140 base::ASCIIToUTF16("test - Google Search");
143 content::TitleWatcher title_watcher(active_tab, search_title); 141 content::TitleWatcher title_watcher(active_tab, search_title);
144 PressEnterAndWaitForNavigation(); 142 PressEnterAndWaitForNavigation();
145 EXPECT_EQ(search_title, title_watcher.WaitAndGetTitle()); 143 EXPECT_EQ(search_title, title_watcher.WaitAndGetTitle());
146 } 144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698