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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc

Issue 13963014: Local omnibox treats navsuggest suggestions as queries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 9 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
10 #include "chrome/browser/ui/views/frame/browser_view_layout.h" 10 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); 203 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser()));
204 ASSERT_TRUE(chrome::UseImmersiveFullscreen()); 204 ASSERT_TRUE(chrome::UseImmersiveFullscreen());
205 chrome::ToggleFullscreenMode(browser()); 205 chrome::ToggleFullscreenMode(browser());
206 ASSERT_TRUE(browser_view->IsFullscreen()); 206 ASSERT_TRUE(browser_view->IsFullscreen());
207 ASSERT_TRUE(browser_view->immersive_mode_controller()->IsEnabled()); 207 ASSERT_TRUE(browser_view->immersive_mode_controller()->IsEnabled());
208 208
209 //////////////////////////////////////////////////////////////////////////// 209 ////////////////////////////////////////////////////////////////////////////
210 // Test suggestions on a normal web page, which are in an overlay. 210 // Test suggestions on a normal web page, which are in an overlay.
211 211
212 // Focus omnibox, which constructs an overlay web contents. 212 // Focus omnibox, which constructs an overlay web contents.
213 FocusOmniboxAndWaitForInstantExtendedSupport(); 213 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport();
214 EXPECT_TRUE(instant()->model()->mode().is_default()); 214 EXPECT_TRUE(instant()->model()->mode().is_default());
215 // The above testing code doesn't trigger the views location bar focus path, 215 // The above testing code doesn't trigger the views location bar focus path,
216 // so force it to happen explicitly. 216 // so force it to happen explicitly.
217 browser_view->SetFocusToLocationBar(false); 217 browser_view->SetFocusToLocationBar(false);
218 EXPECT_TRUE(browser_view->immersive_mode_controller()->IsRevealed()); 218 EXPECT_TRUE(browser_view->immersive_mode_controller()->IsRevealed());
219 // Content area is immediately below the tab indicators. 219 // Content area is immediately below the tab indicators.
220 views::WebView* contents_web_view = 220 views::WebView* contents_web_view =
221 browser_view->GetContentsWebViewForTest(); 221 browser_view->GetContentsWebViewForTest();
222 EXPECT_EQ(GetRectInWidget(browser_view).y() + Tab::GetImmersiveHeight(), 222 EXPECT_EQ(GetRectInWidget(browser_view).y() + Tab::GetImmersiveHeight(),
223 GetRectInWidget(contents_web_view).y()); 223 GetRectInWidget(contents_web_view).y());
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 EXPECT_TRUE(browser_view->immersive_mode_controller()->IsRevealed()); 271 EXPECT_TRUE(browser_view->immersive_mode_controller()->IsRevealed());
272 // The active web contents are aligned with the toolbar. 272 // The active web contents are aligned with the toolbar.
273 gfx::Rect web_view_rect_in_widget = GetRectInWidget( 273 gfx::Rect web_view_rect_in_widget = GetRectInWidget(
274 browser_view->GetContentsContainerForTest()->GetActiveWebViewForTest()); 274 browser_view->GetContentsContainerForTest()->GetActiveWebViewForTest());
275 EXPECT_EQ(GetRectInWidget(toolbar).bottom(), web_view_rect_in_widget.y()); 275 EXPECT_EQ(GetRectInWidget(toolbar).bottom(), web_view_rect_in_widget.y());
276 276
277 BookmarkBarView::DisableAnimationsForTesting(false); 277 BookmarkBarView::DisableAnimationsForTesting(false);
278 } 278 }
279 279
280 #endif // defined(OS_CHROMEOS) 280 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698