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

Side by Side Diff: athena/wm/split_view_controller_unittest.cc

Issue 545393002: Adding split view divider widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code format Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/wm/split_view_controller.h" 5 #include "athena/wm/split_view_controller.h"
6 6
7 #include "athena/screen/public/screen_manager.h" 7 #include "athena/screen/public/screen_manager.h"
8 #include "athena/test/athena_test_base.h" 8 #include "athena/test/athena_test_base.h"
9 #include "athena/wm/public/window_list_provider.h" 9 #include "athena/wm/public/window_list_provider.h"
10 #include "athena/wm/test/window_manager_impl_test_api.h" 10 #include "athena/wm/test/window_manager_impl_test_api.h"
(...skipping 29 matching lines...) Expand all
40 api_->GetWindowListProvider()->GetWindowList(); 40 api_->GetWindowListProvider()->GetWindowList();
41 aura::Window* topmost = *list.rbegin(); 41 aura::Window* topmost = *list.rbegin();
42 aura::Window* second_topmost = *(list.rbegin() + 1); 42 aura::Window* second_topmost = *(list.rbegin() + 1);
43 return (topmost == controller->left_window() || 43 return (topmost == controller->left_window() ||
44 topmost == controller->right_window()) && 44 topmost == controller->right_window()) &&
45 (second_topmost == controller->left_window() || 45 (second_topmost == controller->left_window() ||
46 second_topmost == controller->right_window()); 46 second_topmost == controller->right_window());
47 } 47 }
48 48
49 bool IsSplitViewAllowed() const { 49 bool IsSplitViewAllowed() const {
50 return api_->GetSplitViewController()->CanScroll(); 50 return api_->GetSplitViewController()->BezelCanScroll();
51 } 51 }
52 52
53 test::WindowManagerImplTestApi* api() { 53 test::WindowManagerImplTestApi* api() {
54 return api_.get(); 54 return api_.get();
55 } 55 }
56 56
57 private: 57 private:
58 scoped_ptr<test::WindowManagerImplTestApi> api_; 58 scoped_ptr<test::WindowManagerImplTestApi> api_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(SplitViewControllerTest); 60 DISALLOW_COPY_AND_ASSIGN(SplitViewControllerTest);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Entering splitview should now be disabled now that the screen is in a 147 // Entering splitview should now be disabled now that the screen is in a
148 // portrait orientation. 148 // portrait orientation.
149 EXPECT_FALSE(IsSplitViewAllowed()); 149 EXPECT_FALSE(IsSplitViewAllowed());
150 150
151 // Rotating back to 0 allows splitview again. 151 // Rotating back to 0 allows splitview again.
152 ScreenManager::Get()->SetRotation(gfx::Display::ROTATE_0); 152 ScreenManager::Get()->SetRotation(gfx::Display::ROTATE_0);
153 EXPECT_TRUE(IsSplitViewAllowed()); 153 EXPECT_TRUE(IsSplitViewAllowed());
154 } 154 }
155 155
156 } // namespace athena 156 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698