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 23 matching lines...) Expand all Loading... |
34 Browser::Type browser_type, | 34 Browser::Type browser_type, |
35 chrome::HostDesktopType host_desktop_type, | 35 chrome::HostDesktopType host_desktop_type, |
36 bool hosted_app) | 36 bool hosted_app) |
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 virtual ~ImmersiveModeControllerAshTest() {} | 41 virtual ~ImmersiveModeControllerAshTest() {} |
42 | 42 |
43 // TestWithBrowserView override: | 43 // TestWithBrowserView override: |
44 virtual void SetUp() OVERRIDE { | 44 virtual void SetUp() override { |
45 TestWithBrowserView::SetUp(); | 45 TestWithBrowserView::SetUp(); |
46 | 46 |
47 browser()->window()->Show(); | 47 browser()->window()->Show(); |
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) { |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 // Exit immersive fullscreen. The web contents should be back below the window | 330 // Exit immersive fullscreen. The web contents should be back below the window |
331 // header. | 331 // header. |
332 ToggleFullscreen(); | 332 ToggleFullscreen(); |
333 EXPECT_FALSE(browser_view()->GetWidget()->IsFullscreen()); | 333 EXPECT_FALSE(browser_view()->GetWidget()->IsFullscreen()); |
334 EXPECT_FALSE(controller()->IsEnabled()); | 334 EXPECT_FALSE(controller()->IsEnabled()); |
335 EXPECT_FALSE(tabstrip->visible()); | 335 EXPECT_FALSE(tabstrip->visible()); |
336 EXPECT_FALSE(toolbar->visible()); | 336 EXPECT_FALSE(toolbar->visible()); |
337 EXPECT_EQ(header_height, GetBoundsInWidget(contents_web_view).y()); | 337 EXPECT_EQ(header_height, GetBoundsInWidget(contents_web_view).y()); |
338 } | 338 } |
OLD | NEW |