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

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

Issue 1819533002: Convert ScopedVector<DisplayPlacement> to std::vector<DisplayPlacement> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jsonrefactor
Patch Set: Created 4 years, 9 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/display/screen_position_controller.h" 5 #include "ash/display/screen_position_controller.h"
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/screen_util.h" 8 #include "ash/screen_util.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 28 matching lines...) Expand all
39 namespace ash { 39 namespace ash {
40 namespace test { 40 namespace test {
41 41
42 namespace { 42 namespace {
43 43
44 void SetSecondaryDisplayLayout(DisplayPlacement::Position position) { 44 void SetSecondaryDisplayLayout(DisplayPlacement::Position position) {
45 scoped_ptr<DisplayLayout> layout(Shell::GetInstance() 45 scoped_ptr<DisplayLayout> layout(Shell::GetInstance()
46 ->display_manager() 46 ->display_manager()
47 ->GetCurrentDisplayLayout() 47 ->GetCurrentDisplayLayout()
48 .Copy()); 48 .Copy());
49 layout->placement_list[0]->position = position; 49 layout->placement_list[0].position = position;
50 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 50 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
51 std::move(layout)); 51 std::move(layout));
52 } 52 }
53 53
54 ScreenPositionController* GetScreenPositionController() { 54 ScreenPositionController* GetScreenPositionController() {
55 ShellTestApi test_api(Shell::GetInstance()); 55 ShellTestApi test_api(Shell::GetInstance());
56 return test_api.screen_position_controller(); 56 return test_api.screen_position_controller();
57 } 57 }
58 58
59 class ScreenPositionControllerTest : public test::AshTestBase { 59 class ScreenPositionControllerTest : public test::AshTestBase {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // destroyed. 355 // destroyed.
356 EXPECT_FALSE(tracker.Contains(root_windows[1])); 356 EXPECT_FALSE(tracker.Contains(root_windows[1]));
357 357
358 // Check that we could convert all of the mouse events we got to screen 358 // Check that we could convert all of the mouse events we got to screen
359 // coordinates. 359 // coordinates.
360 EXPECT_TRUE(event_handler->could_convert_to_screen()); 360 EXPECT_TRUE(event_handler->could_convert_to_screen());
361 } 361 }
362 362
363 } // namespace test 363 } // namespace test
364 } // namespace ash 364 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ash/display/window_tree_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698