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

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

Issue 15061005: Fix CustomFrameViewAshTest.ResizeButtonToggleMaximize frame creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Always use CustomFrameViewAsh in CustomFrameViewAshTest.*. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/custom_frame_view_ash.h" 5 #include "ash/wm/custom_frame_view_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/wm/maximize_bubble_controller.h" 9 #include "ash/wm/maximize_bubble_controller.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 }; 61 };
62 62
63 class ShellViewsDelegate : public views::TestViewsDelegate { 63 class ShellViewsDelegate : public views::TestViewsDelegate {
64 public: 64 public:
65 ShellViewsDelegate() {} 65 ShellViewsDelegate() {}
66 virtual ~ShellViewsDelegate() {} 66 virtual ~ShellViewsDelegate() {}
67 67
68 // Overridden from views::TestViewsDelegate: 68 // Overridden from views::TestViewsDelegate:
69 virtual views::NonClientFrameView* CreateDefaultNonClientFrameView( 69 virtual views::NonClientFrameView* CreateDefaultNonClientFrameView(
70 views::Widget* widget) OVERRIDE { 70 views::Widget* widget) OVERRIDE {
71 return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(widget); 71 // Always test CustomFrameViewAsh, which may not be the ash::Shell default.
72 CustomFrameViewAsh* frame_view = new CustomFrameViewAsh;
73 frame_view->Init(widget);
74 return frame_view;
72 } 75 }
73 virtual bool UseTransparentWindows() const OVERRIDE { 76 virtual bool UseTransparentWindows() const OVERRIDE {
74 // Ash uses transparent window frames. 77 // Ash uses transparent window frames.
75 return true; 78 return true;
76 } 79 }
77 80
78 private: 81 private:
79 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegate); 82 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegate);
80 }; 83 };
81 84
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 862
860 // Check that there was no size change. 863 // Check that there was no size change.
861 EXPECT_EQ(widget->GetWindowBoundsInScreen().size().ToString(), 864 EXPECT_EQ(widget->GetWindowBoundsInScreen().size().ToString(),
862 window_position.size().ToString()); 865 window_position.size().ToString());
863 // Check that there is no phantom window left open. 866 // Check that there is no phantom window left open.
864 EXPECT_FALSE(maximize_button->phantom_window_open()); 867 EXPECT_FALSE(maximize_button->phantom_window_open());
865 } 868 }
866 869
867 } // namespace internal 870 } // namespace internal
868 } // namespace ash 871 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698