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

Side by Side Diff: chrome/browser/ui/ash/window_positioner_unittest.cc

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests Created 4 years, 6 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 (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/common/wm/window_positioner.h" 5 #include "ash/common/wm/window_positioner.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/aura/wm_shell_aura.h"
9 #include "ash/common/wm/window_resizer.h" 10 #include "ash/common/wm/window_resizer.h"
10 #include "ash/test/ash_test_base.h" 11 #include "ash/test/ash_test_base.h"
11 #include "ash/test/test_shell_delegate.h" 12 #include "ash/test/test_shell_delegate.h"
12 #include "ash/wm/aura/wm_globals_aura.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
17 #include "chrome/test/base/test_browser_window_aura.h" 17 #include "chrome/test/base/test_browser_window_aura.h"
18 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
19 #include "content/public/test/render_view_test.h" 19 #include "content/public/test/render_view_test.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #include "ui/aura/env.h" 21 #include "ui/aura/env.h"
22 #include "ui/aura/test/test_windows.h" 22 #include "ui/aura/test/test_windows.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 // Creating a browser for the popup. 75 // Creating a browser for the popup.
76 Browser::CreateParams popup_params(Browser::TYPE_POPUP, &profile_); 76 Browser::CreateParams popup_params(Browser::TYPE_POPUP, &profile_);
77 browser_popup_ = chrome::CreateBrowserWithAuraTestWindowForParams( 77 browser_popup_ = chrome::CreateBrowserWithAuraTestWindowForParams(
78 std::move(dummy_popup), &popup_params); 78 std::move(dummy_popup), &popup_params);
79 79
80 // We hide all windows upon start - each user is required to set it up 80 // We hide all windows upon start - each user is required to set it up
81 // as he needs it. 81 // as he needs it.
82 window()->Hide(); 82 window()->Hide();
83 popup()->Hide(); 83 popup()->Hide();
84 window_positioner_.reset(new WindowPositioner(wm::WmGlobals::Get())); 84 window_positioner_.reset(new WindowPositioner(WmShell::Get()));
85 } 85 }
86 86
87 void WindowPositionerTest::TearDown() { 87 void WindowPositionerTest::TearDown() {
88 // Since the AuraTestBase is needed to create our assets, we have to 88 // Since the AuraTestBase is needed to create our assets, we have to
89 // also delete them before we tear it down. 89 // also delete them before we tear it down.
90 browser_.reset(); 90 browser_.reset();
91 browser_popup_.reset(); 91 browser_popup_.reset();
92 window_positioner_.reset(); 92 window_positioner_.reset();
93 AshTestBase::TearDown(); 93 AshTestBase::TearDown();
94 } 94 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 // Check that the popup is placed full screen. 224 // Check that the popup is placed full screen.
225 gfx::Rect full = window_positioner()->GetPopupPosition(pop_position); 225 gfx::Rect full = window_positioner()->GetPopupPosition(pop_position);
226 EXPECT_EQ(gfx::Rect(work_area.x(), work_area.y(), 226 EXPECT_EQ(gfx::Rect(work_area.x(), work_area.y(),
227 pop_position.width(), pop_position.height()), 227 pop_position.width(), pop_position.height()),
228 full); 228 full);
229 } 229 }
230 230
231 } // namespace test 231 } // namespace test
232 } // namespace ash 232 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698