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

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

Issue 621133002: replace OVERRIDE and FINAL with override and final in ash/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/display/screen_position_controller.h ('k') | ash/display/shared_display_edge_indicator.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/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/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ScreenPositionController* GetScreenPositionController() { 44 ScreenPositionController* GetScreenPositionController() {
45 ShellTestApi test_api(Shell::GetInstance()); 45 ShellTestApi test_api(Shell::GetInstance());
46 return test_api.screen_position_controller(); 46 return test_api.screen_position_controller();
47 } 47 }
48 48
49 class ScreenPositionControllerTest : public test::AshTestBase { 49 class ScreenPositionControllerTest : public test::AshTestBase {
50 public: 50 public:
51 ScreenPositionControllerTest() {} 51 ScreenPositionControllerTest() {}
52 virtual ~ScreenPositionControllerTest() {} 52 virtual ~ScreenPositionControllerTest() {}
53 53
54 virtual void SetUp() OVERRIDE { 54 virtual void SetUp() override {
55 AshTestBase::SetUp(); 55 AshTestBase::SetUp();
56 window_.reset(new aura::Window(&window_delegate_)); 56 window_.reset(new aura::Window(&window_delegate_));
57 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); 57 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
58 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); 58 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
59 ParentWindowInPrimaryRootWindow(window_.get()); 59 ParentWindowInPrimaryRootWindow(window_.get());
60 window_->set_id(1); 60 window_->set_id(1);
61 } 61 }
62 62
63 virtual void TearDown() OVERRIDE { 63 virtual void TearDown() override {
64 window_.reset(); 64 window_.reset();
65 AshTestBase::TearDown(); 65 AshTestBase::TearDown();
66 } 66 }
67 67
68 // Converts a point (x, y) in host window's coordinate to screen and 68 // Converts a point (x, y) in host window's coordinate to screen and
69 // returns its string representation. 69 // returns its string representation.
70 std::string ConvertHostPointToScreen(int x, int y) const { 70 std::string ConvertHostPointToScreen(int x, int y) const {
71 gfx::Point point(x, y); 71 gfx::Point point(x, y);
72 GetScreenPositionController()->ConvertHostPointToScreen( 72 GetScreenPositionController()->ConvertHostPointToScreen(
73 window_->GetRootWindow(), &point); 73 window_->GetRootWindow(), &point);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 EXPECT_EQ("210,70", ConvertHostPointToScreen(60, 70)); 271 EXPECT_EQ("210,70", ConvertHostPointToScreen(60, 70));
272 // The point is out of the host windows. 272 // The point is out of the host windows.
273 EXPECT_EQ("210,-50", ConvertHostPointToScreen(60, -50)); 273 EXPECT_EQ("210,-50", ConvertHostPointToScreen(60, -50));
274 // The point is on the 2nd host. Point on 1nd host (60, 60) 274 // The point is on the 2nd host. Point on 1nd host (60, 60)
275 // 1/2 * 1.5 = (45,45) 275 // 1/2 * 1.5 = (45,45)
276 EXPECT_EQ("45,45", ConvertHostPointToScreen(60, -340)); 276 EXPECT_EQ("45,45", ConvertHostPointToScreen(60, -340));
277 } 277 }
278 278
279 } // namespace test 279 } // namespace test
280 } // namespace ash 280 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/screen_position_controller.h ('k') | ash/display/shared_display_edge_indicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698