OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |