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

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

Issue 1943603002: Makes ash/wm/common a library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again Created 4 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
« no previous file with comments | « ash/wm/window_state_aura.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | 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/common/window_positioner.h" 5 #include "ash/wm/common/window_positioner.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "ash/test/test_shell_delegate.h" 10 #include "ash/test/test_shell_delegate.h"
(...skipping 63 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::WmGlobalsAura::Get())); 84 window_positioner_.reset(new WindowPositioner(wm::WmGlobals::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
« no previous file with comments | « ash/wm/window_state_aura.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698