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

Side by Side Diff: ash/magnifier/magnification_controller_unittest.cc

Issue 2055273004: Remove unused variables, ash/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/magnifier/magnification_controller.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/magnifier/magnification_controller.h" 5 #include "ash/magnifier/magnification_controller.h"
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 class MagnificationControllerTest: public test::AshTestBase { 61 class MagnificationControllerTest: public test::AshTestBase {
62 public: 62 public:
63 MagnificationControllerTest() : text_input_view_(NULL) {} 63 MagnificationControllerTest() : text_input_view_(NULL) {}
64 ~MagnificationControllerTest() override {} 64 ~MagnificationControllerTest() override {}
65 65
66 void SetUp() override { 66 void SetUp() override {
67 AshTestBase::SetUp(); 67 AshTestBase::SetUp();
68 UpdateDisplay(base::StringPrintf("%dx%d", kRootWidth, kRootHeight)); 68 UpdateDisplay(base::StringPrintf("%dx%d", kRootWidth, kRootHeight));
69 69
70 aura::Window* root = GetRootWindow();
71 gfx::Rect root_bounds(root->bounds());
72
73 #if defined(OS_WIN) 70 #if defined(OS_WIN)
74 // RootWindow and Display can't resize on Windows Ash. 71 // RootWindow and Display can't resize on Windows Ash.
75 // http://crbug.com/165962 72 // http://crbug.com/165962
73 aura::Window* root = GetRootWindow();
74 gfx::Rect root_bounds(root->bounds());
76 EXPECT_EQ(kRootHeight, root_bounds.height()); 75 EXPECT_EQ(kRootHeight, root_bounds.height());
77 EXPECT_EQ(kRootWidth, root_bounds.width()); 76 EXPECT_EQ(kRootWidth, root_bounds.width());
78 #endif 77 #endif
79 78
80 GetMagnificationController()->DisableMoveMagnifierDelayForTesting(); 79 GetMagnificationController()->DisableMoveMagnifierDelayForTesting();
81 } 80 }
82 81
83 void TearDown() override { AshTestBase::TearDown(); } 82 void TearDown() override { AshTestBase::TearDown(); }
84 83
85 protected: 84 protected:
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 UpdateDisplay("500x500"); 710 UpdateDisplay("500x500");
712 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString()); 711 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString());
713 EXPECT_EQ(2.0f, GetMagnificationController()->GetScale()); 712 EXPECT_EQ(2.0f, GetMagnificationController()->GetScale());
714 713
715 GetMagnificationController()->SetEnabled(false); 714 GetMagnificationController()->SetEnabled(false);
716 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString()); 715 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString());
717 EXPECT_EQ(1.0f, GetMagnificationController()->GetScale()); 716 EXPECT_EQ(1.0f, GetMagnificationController()->GetScale());
718 } 717 }
719 718
720 } // namespace ash 719 } // namespace ash
OLDNEW
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698