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

Side by Side Diff: chrome/browser/ui/browser_navigator_browsertest.cc

Issue 10086026: Revert 132281 - Add more functionality to WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ui/browser_navigator_browsertest.h" 5 #include "chrome/browser/ui/browser_navigator_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/autocomplete/autocomplete_edit.h" 9 #include "chrome/browser/autocomplete/autocomplete_edit.h"
10 #include "chrome/browser/prefs/incognito_mode_prefs.h" 10 #include "chrome/browser/prefs/incognito_mode_prefs.h"
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 controller(); 1213 controller();
1214 1214
1215 // Simulate an alt-enter. 1215 // Simulate an alt-enter.
1216 controller->OnAutocompleteAccept(url2, NEW_FOREGROUND_TAB, 1216 controller->OnAutocompleteAccept(url2, NEW_FOREGROUND_TAB,
1217 content::PAGE_TRANSITION_TYPED, GURL()); 1217 content::PAGE_TRANSITION_TYPED, GURL());
1218 1218
1219 // Make sure the second tab is selected. 1219 // Make sure the second tab is selected.
1220 EXPECT_EQ(1, browser()->active_index()); 1220 EXPECT_EQ(1, browser()->active_index());
1221 1221
1222 // The tab contents should have the focus in the second tab. 1222 // The tab contents should have the focus in the second tab.
1223 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), VIEW_ID_TAB_CONTAINER)); 1223 EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(),
1224 VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
1224 1225
1225 // Go back to the first tab. The focus should not be in the omnibox. 1226 // Go back to the first tab. The focus should not be in the omnibox.
1226 browser()->SelectPreviousTab(); 1227 browser()->SelectPreviousTab();
1227 EXPECT_EQ(0, browser()->active_index()); 1228 EXPECT_EQ(0, browser()->active_index());
1228 EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(), 1229 EXPECT_FALSE(ui_test_utils::IsViewFocused(browser(),
1229 VIEW_ID_LOCATION_BAR)); 1230 VIEW_ID_LOCATION_BAR));
1230 } 1231 }
1231 1232
1232 // TODO(csilv): Update this for uber page. http://crbug.com/111579. 1233 // TODO(csilv): Update this for uber page. http://crbug.com/111579.
1233 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, 1234 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 EXPECT_EQ(browser(), p2.browser); 1323 EXPECT_EQ(browser(), p2.browser);
1323 1324
1324 // We should now have two windows, the browser() provided by the framework and 1325 // We should now have two windows, the browser() provided by the framework and
1325 // the panel window we opened earlier. The tabbed browser window has 2 tabs. 1326 // the panel window we opened earlier. The tabbed browser window has 2 tabs.
1326 EXPECT_EQ(2u, BrowserList::size()); 1327 EXPECT_EQ(2u, BrowserList::size());
1327 EXPECT_EQ(2, browser()->tab_count()); 1328 EXPECT_EQ(2, browser()->tab_count());
1328 EXPECT_EQ(1, panel_browser->tab_count()); 1329 EXPECT_EQ(1, panel_browser->tab_count());
1329 } 1330 }
1330 1331
1331 } // namespace 1332 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/browser_keyevents_browsertest.cc ('k') | chrome/browser/ui/views/find_bar_host_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698