OLD | NEW |
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 "chrome/browser/ui/ash/window_positioner.h" | 5 #include "chrome/browser/ui/ash/window_positioner.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/test/test_shell_delegate.h" | 9 #include "ash/test/test_shell_delegate.h" |
10 #include "ash/wm/window_resizer.h" | 10 #include "ash/wm/window_resizer.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 scoped_ptr<Browser> window_owning_browser_; | 94 scoped_ptr<Browser> window_owning_browser_; |
95 scoped_ptr<Browser> popup_owning_browser_; | 95 scoped_ptr<Browser> popup_owning_browser_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(WindowPositionerTest); | 97 DISALLOW_COPY_AND_ASSIGN(WindowPositionerTest); |
98 }; | 98 }; |
99 | 99 |
100 WindowPositionerTest::WindowPositionerTest() | 100 WindowPositionerTest::WindowPositionerTest() |
101 : grid_size_(WindowPositioner::kMinimumWindowOffset), | 101 : grid_size_(WindowPositioner::kMinimumWindowOffset), |
102 window_positioner_(NULL) { | 102 window_positioner_(NULL) { |
103 // Create a message loop. | 103 // Create a message loop. |
104 MessageLoopForUI* ui_loop = message_loop(); | 104 base::MessageLoopForUI* ui_loop = message_loop(); |
105 ui_thread_.reset( | 105 ui_thread_.reset( |
106 new content::TestBrowserThread(content::BrowserThread::UI, ui_loop)); | 106 new content::TestBrowserThread(content::BrowserThread::UI, ui_loop)); |
107 | 107 |
108 // Create a browser profile. | 108 // Create a browser profile. |
109 profile_.reset(new TestingProfile()); | 109 profile_.reset(new TestingProfile()); |
110 } | 110 } |
111 | 111 |
112 WindowPositionerTest::~WindowPositionerTest() { | 112 WindowPositionerTest::~WindowPositionerTest() { |
113 profile_.reset(NULL); | 113 profile_.reset(NULL); |
114 ui_thread_.reset(NULL); | 114 ui_thread_.reset(NULL); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 290 |
291 // Check that the popup is placed full screen. | 291 // Check that the popup is placed full screen. |
292 gfx::Rect full = window_positioner()->GetPopupPosition(pop_position); | 292 gfx::Rect full = window_positioner()->GetPopupPosition(pop_position); |
293 EXPECT_EQ(gfx::Rect(work_area.x(), work_area.y(), | 293 EXPECT_EQ(gfx::Rect(work_area.x(), work_area.y(), |
294 pop_position.width(), pop_position.height()), | 294 pop_position.width(), pop_position.height()), |
295 full); | 295 full); |
296 } | 296 } |
297 | 297 |
298 } // namespace test | 298 } // namespace test |
299 } // namespace ash | 299 } // namespace ash |
OLD | NEW |