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

Side by Side Diff: ash/common/test/ash_test.cc

Issue 2420783002: mustash: Convert TraySupervisedUserTest to AshTest (Closed)
Patch Set: rebase Created 4 years, 2 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/common/test/ash_test.h ('k') | ash/common/test/test_system_tray_delegate.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/test/ash_test.h" 5 #include "ash/common/test/ash_test.h"
6 6
7 #include "ash/common/shelf/wm_shelf.h" 7 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/common/system/status_area_widget.h" 8 #include "ash/common/system/status_area_widget.h"
9 #include "ash/common/test/ash_test_impl.h" 9 #include "ash/common/test/ash_test_impl.h"
10 #include "ash/common/test/test_session_state_delegate.h" 10 #include "ash/common/test/test_session_state_delegate.h"
11 #include "ash/common/test/test_system_tray_delegate.h"
11 #include "ash/common/wm_root_window_controller.h" 12 #include "ash/common/wm_root_window_controller.h"
12 #include "ash/common/wm_shell.h" 13 #include "ash/common/wm_shell.h"
13 #include "ash/common/wm_window.h" 14 #include "ash/common/wm_window.h"
14 #include "base/run_loop.h" 15 #include "base/run_loop.h"
15 #include "ui/compositor/layer_type.h" 16 #include "ui/compositor/layer_type.h"
16 #include "ui/display/display.h" 17 #include "ui/display/display.h"
17 18
18 namespace ash { 19 namespace ash {
19 20
20 WindowOwner::WindowOwner(WmWindow* window) : window_(window) {} 21 WindowOwner::WindowOwner(WmWindow* window) : window_(window) {}
(...skipping 12 matching lines...) Expand all
33 ->GetPrimaryRootWindow() 34 ->GetPrimaryRootWindow()
34 ->GetRootWindowController() 35 ->GetRootWindowController()
35 ->GetShelf(); 36 ->GetShelf();
36 } 37 }
37 38
38 // static 39 // static
39 SystemTray* AshTest::GetPrimarySystemTray() { 40 SystemTray* AshTest::GetPrimarySystemTray() {
40 return GetPrimaryShelf()->GetStatusAreaWidget()->system_tray(); 41 return GetPrimaryShelf()->GetStatusAreaWidget()->system_tray();
41 } 42 }
42 43
44 // static
45 test::TestSystemTrayDelegate* AshTest::GetSystemTrayDelegate() {
46 return static_cast<test::TestSystemTrayDelegate*>(
47 WmShell::Get()->system_tray_delegate());
48 }
49
43 bool AshTest::SupportsMultipleDisplays() const { 50 bool AshTest::SupportsMultipleDisplays() const {
44 return test_impl_->SupportsMultipleDisplays(); 51 return test_impl_->SupportsMultipleDisplays();
45 } 52 }
46 53
47 void AshTest::UpdateDisplay(const std::string& display_spec) { 54 void AshTest::UpdateDisplay(const std::string& display_spec) {
48 return test_impl_->UpdateDisplay(display_spec); 55 return test_impl_->UpdateDisplay(display_spec);
49 } 56 }
50 57
51 std::unique_ptr<WindowOwner> AshTest::CreateTestWindow(const gfx::Rect& bounds, 58 std::unique_ptr<WindowOwner> AshTest::CreateTestWindow(const gfx::Rect& bounds,
52 ui::wm::WindowType type, 59 ui::wm::WindowType type,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 133
127 void AshTest::SetUp() { 134 void AshTest::SetUp() {
128 test_impl_->SetUp(); 135 test_impl_->SetUp();
129 } 136 }
130 137
131 void AshTest::TearDown() { 138 void AshTest::TearDown() {
132 test_impl_->TearDown(); 139 test_impl_->TearDown();
133 } 140 }
134 141
135 } // namespace ash 142 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/test/ash_test.h ('k') | ash/common/test/test_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698