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

Side by Side Diff: ash/wm/immersive_fullscreen_controller_unittest.cc

Issue 2222653002: Moves CustomFrameViewAsh to common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 4 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
« no previous file with comments | « ash/wm/immersive_fullscreen_controller.cc ('k') | ash/wm/panels/panel_frame_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/wm/immersive_fullscreen_controller.h" 5 #include "ash/wm/immersive_fullscreen_controller.h"
6 6
7 #include "ash/common/shelf/shelf_types.h" 7 #include "ash/common/shelf/shelf_types.h"
8 #include "ash/common/wm/immersive/wm_immersive_fullscreen_controller_delegate.h"
8 #include "ash/common/wm/window_state.h" 9 #include "ash/common/wm/window_state.h"
9 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
10 #include "ash/display/mouse_cursor_event_filter.h" 11 #include "ash/display/mouse_cursor_event_filter.h"
11 #include "ash/root_window_controller.h" 12 #include "ash/root_window_controller.h"
12 #include "ash/shelf/shelf.h" 13 #include "ash/shelf/shelf.h"
13 #include "ash/shell.h" 14 #include "ash/shell.h"
14 #include "ash/test/ash_test_base.h" 15 #include "ash/test/ash_test_base.h"
15 #include "ash/test/display_manager_test_api.h" 16 #include "ash/test/display_manager_test_api.h"
16 #include "ash/wm/window_state_aura.h" 17 #include "ash/wm/window_state_aura.h"
17 #include "ui/aura/client/aura_constants.h" 18 #include "ui/aura/client/aura_constants.h"
(...skipping 20 matching lines...) Expand all
38 public: 39 public:
39 explicit TestBubbleDialogDelegate(views::View* anchor) 40 explicit TestBubbleDialogDelegate(views::View* anchor)
40 : BubbleDialogDelegateView(anchor, views::BubbleBorder::NONE) {} 41 : BubbleDialogDelegateView(anchor, views::BubbleBorder::NONE) {}
41 ~TestBubbleDialogDelegate() override {} 42 ~TestBubbleDialogDelegate() override {}
42 43
43 private: 44 private:
44 DISALLOW_COPY_AND_ASSIGN(TestBubbleDialogDelegate); 45 DISALLOW_COPY_AND_ASSIGN(TestBubbleDialogDelegate);
45 }; 46 };
46 47
47 class MockImmersiveFullscreenControllerDelegate 48 class MockImmersiveFullscreenControllerDelegate
48 : public ImmersiveFullscreenController::Delegate { 49 : public WmImmersiveFullscreenControllerDelegate {
49 public: 50 public:
50 MockImmersiveFullscreenControllerDelegate(views::View* top_container_view) 51 MockImmersiveFullscreenControllerDelegate(views::View* top_container_view)
51 : top_container_view_(top_container_view), 52 : top_container_view_(top_container_view),
52 enabled_(false), 53 enabled_(false),
53 visible_fraction_(1) {} 54 visible_fraction_(1) {}
54 ~MockImmersiveFullscreenControllerDelegate() override {} 55 ~MockImmersiveFullscreenControllerDelegate() override {}
55 56
56 // ImmersiveFullscreenController::Delegate overrides: 57 // WmImmersiveFullscreenControllerDelegate overrides:
57 void OnImmersiveRevealStarted() override { 58 void OnImmersiveRevealStarted() override {
58 enabled_ = true; 59 enabled_ = true;
59 visible_fraction_ = 0; 60 visible_fraction_ = 0;
60 } 61 }
61 void OnImmersiveRevealEnded() override { visible_fraction_ = 0; } 62 void OnImmersiveRevealEnded() override { visible_fraction_ = 0; }
62 void OnImmersiveFullscreenExited() override { 63 void OnImmersiveFullscreenExited() override {
63 enabled_ = false; 64 enabled_ = false;
64 visible_fraction_ = 1; 65 visible_fraction_ = 1;
65 } 66 }
66 void SetVisibleFraction(double visible_fraction) override { 67 void SetVisibleFraction(double visible_fraction) override {
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 SetEnabled(true); 1047 SetEnabled(true);
1047 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); 1048 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
1048 1049
1049 // Disabling immersive fullscreen maintains the user's auto-hide selection. 1050 // Disabling immersive fullscreen maintains the user's auto-hide selection.
1050 SetEnabled(false); 1051 SetEnabled(false);
1051 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 1052 window()->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
1052 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); 1053 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
1053 } 1054 }
1054 1055
1055 } // namespase ash 1056 } // namespase ash
OLDNEW
« no previous file with comments | « ash/wm/immersive_fullscreen_controller.cc ('k') | ash/wm/panels/panel_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698