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

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

Issue 16070003: Move immersive fullscreen check into ImmersiveFullscreenConfiguration. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rm DEPS file Created 7 years, 7 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 (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/autocomplete/autocomplete_controller.h" 8 #include "chrome/browser/autocomplete/autocomplete_controller.h"
9 #include "chrome/browser/search/search.h" 9 #include "chrome/browser/search/search.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
11 #include "chrome/browser/ui/immersive_fullscreen_configuration.h"
11 #include "chrome/browser/ui/omnibox/omnibox_view.h" 12 #include "chrome/browser/ui/omnibox/omnibox_view.h"
12 #include "chrome/browser/ui/search/instant_test_utils.h" 13 #include "chrome/browser/ui/search/instant_test_utils.h"
13 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
14 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 15 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
15 #include "chrome/browser/ui/views/frame/contents_container.h" 16 #include "chrome/browser/ui/views/frame/contents_container.h"
16 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" 17 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
17 #include "chrome/browser/ui/views/frame/overlay_container.h" 18 #include "chrome/browser/ui/views/frame/overlay_container.h"
18 #include "chrome/browser/ui/views/frame/top_container_view.h" 19 #include "chrome/browser/ui/views/frame/top_container_view.h"
19 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 20 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
20 #include "chrome/browser/ui/views/tabs/tab.h" 21 #include "chrome/browser/ui/views/tabs/tab.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 ui::ScopedAnimationDurationScaleMode zero_duration_mode( 190 ui::ScopedAnimationDurationScaleMode zero_duration_mode(
190 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION); 191 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION);
191 BookmarkBarView::DisableAnimationsForTesting(true); 192 BookmarkBarView::DisableAnimationsForTesting(true);
192 193
193 // Cache some pointers we'll need below. 194 // Cache some pointers we'll need below.
194 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); 195 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window());
195 ToolbarView* toolbar = browser_view->toolbar(); 196 ToolbarView* toolbar = browser_view->toolbar();
196 197
197 // Start up both instant and immersive fullscreen. 198 // Start up both instant and immersive fullscreen.
198 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); 199 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser()));
199 ASSERT_TRUE(chrome::UseImmersiveFullscreen()); 200 ASSERT_TRUE(ImmersiveFullscreenConfiguration::UseImmersiveFullscreen());
200 chrome::ToggleFullscreenMode(browser()); 201 chrome::ToggleFullscreenMode(browser());
201 ASSERT_TRUE(browser_view->IsFullscreen()); 202 ASSERT_TRUE(browser_view->IsFullscreen());
202 ASSERT_TRUE(browser_view->immersive_mode_controller()->IsEnabled()); 203 ASSERT_TRUE(browser_view->immersive_mode_controller()->IsEnabled());
203 204
204 //////////////////////////////////////////////////////////////////////////// 205 ////////////////////////////////////////////////////////////////////////////
205 // Test suggestions on a normal web page, which are in an overlay. 206 // Test suggestions on a normal web page, which are in an overlay.
206 207
207 // Focus omnibox, which constructs an overlay web contents. 208 // Focus omnibox, which constructs an overlay web contents.
208 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport(); 209 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport();
209 EXPECT_TRUE(instant()->model()->mode().is_default()); 210 EXPECT_TRUE(instant()->model()->mode().is_default());
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 EXPECT_TRUE(browser_view->immersive_mode_controller()->IsRevealed()); 289 EXPECT_TRUE(browser_view->immersive_mode_controller()->IsRevealed());
289 // The active web contents are aligned with the toolbar. 290 // The active web contents are aligned with the toolbar.
290 gfx::Rect web_view_rect_in_widget = GetRectInWidget( 291 gfx::Rect web_view_rect_in_widget = GetRectInWidget(
291 browser_view->GetContentsContainerForTest()->GetActiveWebViewForTest()); 292 browser_view->GetContentsContainerForTest()->GetActiveWebViewForTest());
292 EXPECT_EQ(GetRectInWidget(toolbar).bottom(), web_view_rect_in_widget.y()); 293 EXPECT_EQ(GetRectInWidget(toolbar).bottom(), web_view_rect_in_widget.y());
293 294
294 BookmarkBarView::DisableAnimationsForTesting(false); 295 BookmarkBarView::DisableAnimationsForTesting(false);
295 } 296 }
296 297
297 #endif // defined(OS_CHROMEOS) 298 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698