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

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

Issue 10810062: Moving common code into OmniboxView from OmniboxView* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename GetTextLength to allow reasoning about win version" Created 8 years, 5 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/prefs/incognito_mode_prefs.h" 9 #include "chrome/browser/prefs/incognito_mode_prefs.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 // Navigate to url. 1159 // Navigate to url.
1160 chrome::NavigateParams p(MakeNavigateParams()); 1160 chrome::NavigateParams p(MakeNavigateParams());
1161 p.disposition = CURRENT_TAB; 1161 p.disposition = CURRENT_TAB;
1162 p.url = url; 1162 p.url = url;
1163 chrome::Navigate(&p); 1163 chrome::Navigate(&p);
1164 1164
1165 // Focus the omnibox. 1165 // Focus the omnibox.
1166 chrome::FocusLocationBar(browser()); 1166 chrome::FocusLocationBar(browser());
1167 1167
1168 OmniboxEditController* controller = 1168 OmniboxEditController* controller =
1169 browser()->window()->GetLocationBar()->GetLocationEntry()->model()-> 1169 browser()->window()->GetLocationBar()->GetLocationEntry()->GetModel()->
1170 controller(); 1170 controller();
1171 1171
1172 // Simulate an alt-enter. 1172 // Simulate an alt-enter.
1173 controller->OnAutocompleteAccept(url2, NEW_FOREGROUND_TAB, 1173 controller->OnAutocompleteAccept(url2, NEW_FOREGROUND_TAB,
1174 content::PAGE_TRANSITION_TYPED, GURL()); 1174 content::PAGE_TRANSITION_TYPED, GURL());
1175 1175
1176 // Make sure the second tab is selected. 1176 // Make sure the second tab is selected.
1177 EXPECT_EQ(1, browser()->active_index()); 1177 EXPECT_EQ(1, browser()->active_index());
1178 1178
1179 // The tab contents should have the focus in the second tab. 1179 // The tab contents should have the focus in the second tab.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 EXPECT_EQ(browser(), p2.browser); 1279 EXPECT_EQ(browser(), p2.browser);
1280 1280
1281 // We should now have two windows, the browser() provided by the framework and 1281 // We should now have two windows, the browser() provided by the framework and
1282 // the panel window we opened earlier. The tabbed browser window has 2 tabs. 1282 // the panel window we opened earlier. The tabbed browser window has 2 tabs.
1283 EXPECT_EQ(2u, BrowserList::size()); 1283 EXPECT_EQ(2u, BrowserList::size());
1284 EXPECT_EQ(2, browser()->tab_count()); 1284 EXPECT_EQ(2, browser()->tab_count());
1285 EXPECT_EQ(1, panel_browser->tab_count()); 1285 EXPECT_EQ(1, panel_browser->tab_count());
1286 } 1286 }
1287 1287
1288 } // namespace 1288 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698