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

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

Issue 1158523002: Add user_gesture param to BaseWindow::Show Base URL: https://chromium.googlesource.com/chromium/src.git@ug3_BaseWindow_Activate
Patch Set: Update callers Created 5 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 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 "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" 5 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_types.h" 10 #include "ash/shelf/shelf_types.h"
(...skipping 26 matching lines...) Expand all
37 : TestWithBrowserView(browser_type, 37 : TestWithBrowserView(browser_type,
38 host_desktop_type, 38 host_desktop_type,
39 hosted_app) { 39 hosted_app) {
40 } 40 }
41 ~ImmersiveModeControllerAshTest() override {} 41 ~ImmersiveModeControllerAshTest() override {}
42 42
43 // TestWithBrowserView override: 43 // TestWithBrowserView override:
44 void SetUp() override { 44 void SetUp() override {
45 TestWithBrowserView::SetUp(); 45 TestWithBrowserView::SetUp();
46 46
47 browser()->window()->Show(); 47 browser()->window()->Show(false /* user_gesture */);
48 48
49 controller_ = browser_view()->immersive_mode_controller(); 49 controller_ = browser_view()->immersive_mode_controller();
50 controller_->SetupForTest(); 50 controller_->SetupForTest();
51 } 51 }
52 52
53 // Returns the bounds of |view| in widget coordinates. 53 // Returns the bounds of |view| in widget coordinates.
54 gfx::Rect GetBoundsInWidget(views::View* view) { 54 gfx::Rect GetBoundsInWidget(views::View* view) {
55 return view->ConvertRectToWidget(view->GetLocalBounds()); 55 return view->ConvertRectToWidget(view->GetLocalBounds());
56 } 56 }
57 57
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 // Exit immersive fullscreen. The web contents should be back below the window 339 // Exit immersive fullscreen. The web contents should be back below the window
340 // header. 340 // header.
341 ToggleFullscreen(); 341 ToggleFullscreen();
342 EXPECT_FALSE(browser_view()->GetWidget()->IsFullscreen()); 342 EXPECT_FALSE(browser_view()->GetWidget()->IsFullscreen());
343 EXPECT_FALSE(controller()->IsEnabled()); 343 EXPECT_FALSE(controller()->IsEnabled());
344 EXPECT_FALSE(tabstrip->visible()); 344 EXPECT_FALSE(tabstrip->visible());
345 EXPECT_FALSE(toolbar->visible()); 345 EXPECT_FALSE(toolbar->visible());
346 EXPECT_EQ(header_height, GetBoundsInWidget(contents_web_view).y()); 346 EXPECT_EQ(header_height, GetBoundsInWidget(contents_web_view).y());
347 } 347 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/web_app_left_header_view_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698