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

Side by Side Diff: ash/display/window_tree_host_manager_unittest.cc

Issue 2840393002: chromeos: converts TopLevelWindowFactoryTest to AshTestBase (Closed)
Patch Set: remove duplicate function Created 3 years, 8 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 | « no previous file | ash/mus/test/wm_test_base.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 (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/display/window_tree_host_manager.h" 5 #include "ash/display/window_tree_host_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/display/display_util.h" 9 #include "ash/display/display_util.h"
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 int workarea_changed_count_; 173 int workarea_changed_count_;
174 int primary_changed_count_; 174 int primary_changed_count_;
175 int64_t changed_display_id_; 175 int64_t changed_display_id_;
176 176
177 int focus_changed_count_; 177 int focus_changed_count_;
178 int activation_changed_count_; 178 int activation_changed_count_;
179 179
180 DISALLOW_COPY_AND_ASSIGN(TestObserver); 180 DISALLOW_COPY_AND_ASSIGN(TestObserver);
181 }; 181 };
182 182
183 display::Display GetPrimaryDisplay() {
184 return display::Screen::GetScreen()->GetDisplayNearestWindow(
185 Shell::GetAllRootWindows()[0]);
186 }
187
188 class TestHelper { 183 class TestHelper {
189 public: 184 public:
190 explicit TestHelper(test::AshTestBase* delegate); 185 explicit TestHelper(test::AshTestBase* delegate);
191 ~TestHelper(); 186 ~TestHelper();
192 187
193 void SetSecondaryDisplayLayoutAndOffset( 188 void SetSecondaryDisplayLayoutAndOffset(
194 display::DisplayPlacement::Position position, 189 display::DisplayPlacement::Position position,
195 int offset); 190 int offset);
196 191
197 void SetSecondaryDisplayLayout(display::DisplayPlacement::Position position); 192 void SetSecondaryDisplayLayout(display::DisplayPlacement::Position position);
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 widget->GetNativeWindow()->GetRootWindow()); 1701 widget->GetNativeWindow()->GetRootWindow());
1707 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow()); 1702 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow());
1708 1703
1709 UpdateDisplay("300x300"); 1704 UpdateDisplay("300x300");
1710 watcher.Stop(); 1705 watcher.Stop();
1711 1706
1712 widget->CloseNow(); 1707 widget->CloseNow();
1713 } 1708 }
1714 1709
1715 } // namespace ash 1710 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/mus/test/wm_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698