OLD | NEW |
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 "ash/frame/custom_frame_view_ash.h" | 5 #include "ash/frame/custom_frame_view_ash.h" |
6 | 6 |
7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "grit/ash_resources.h" | 9 #include "grit/ash_resources.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 TestWidgetDelegate* delegate = new TestWidgetDelegate; | 107 TestWidgetDelegate* delegate = new TestWidgetDelegate; |
108 | 108 |
109 scoped_ptr<views::Widget> widget(CreateWidget(delegate)); | 109 scoped_ptr<views::Widget> widget(CreateWidget(delegate)); |
110 widget->Show(); | 110 widget->Show(); |
111 | 111 |
112 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 112 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
113 gfx::ImageSkia* close_button = | 113 gfx::ImageSkia* close_button = |
114 rb.GetImageSkiaNamed(IDR_AURA_WINDOW_CONTROL_BACKGROUND_H); | 114 rb.GetImageSkiaNamed(IDR_AURA_WINDOW_CONTROL_BACKGROUND_H); |
115 | 115 |
116 // |kSeparatorSize| should match |kHeaderContentSeparatorSize| in | 116 // |kSeparatorSize| should match |kHeaderContentSeparatorSize| in |
117 // header_painter.cc | 117 // default_header_painter.cc |
118 // TODO(pkotwicz): Clean this test up once the separator overlays the window | 118 // TODO(pkotwicz): Clean this test up once the separator overlays the window |
119 // controls. | 119 // controls. |
120 const int kSeparatorSize = 1; | 120 const int kSeparatorSize = 1; |
121 | 121 |
122 // The header should have enough room for the window controls and the | 122 // The header should have enough room for the window controls and the |
123 // separator line. | 123 // separator line. |
124 EXPECT_EQ(close_button->height() + kSeparatorSize, | 124 EXPECT_EQ(close_button->height() + kSeparatorSize, |
125 delegate->custom_frame_view()->GetHeaderView()->height()); | 125 delegate->custom_frame_view()->GetHeaderView()->height()); |
126 | 126 |
127 widget->Maximize(); | 127 widget->Maximize(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 EXPECT_EQ(min_client_size.width(), min_frame_size.width()); | 163 EXPECT_EQ(min_client_size.width(), min_frame_size.width()); |
164 EXPECT_EQ(max_client_size.width(), max_frame_size.width()); | 164 EXPECT_EQ(max_client_size.width(), max_frame_size.width()); |
165 EXPECT_EQ(min_client_size.height() + delegate->GetTitleBarHeight(), | 165 EXPECT_EQ(min_client_size.height() + delegate->GetTitleBarHeight(), |
166 min_frame_size.height()); | 166 min_frame_size.height()); |
167 EXPECT_EQ(max_client_size.height() + delegate->GetTitleBarHeight(), | 167 EXPECT_EQ(max_client_size.height() + delegate->GetTitleBarHeight(), |
168 max_frame_size.height()); | 168 max_frame_size.height()); |
169 } | 169 } |
170 | 170 |
171 } // namespace ash | 171 } // namespace ash |
OLD | NEW |