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

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

Issue 2618143002: cros: Remove some OS platform ifdefs from ash (Closed)
Patch Set: rebase Created 3 years, 11 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/drag_drop/drag_drop_interactive_uitest.cc ('k') | ash/metrics/user_metrics_recorder.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) 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/common/accessibility_types.h" 7 #include "ash/common/accessibility_types.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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 class MagnificationControllerTest : public test::AshTestBase { 59 class MagnificationControllerTest : public test::AshTestBase {
60 public: 60 public:
61 MagnificationControllerTest() : text_input_view_(NULL) {} 61 MagnificationControllerTest() : text_input_view_(NULL) {}
62 ~MagnificationControllerTest() override {} 62 ~MagnificationControllerTest() override {}
63 63
64 void SetUp() override { 64 void SetUp() override {
65 AshTestBase::SetUp(); 65 AshTestBase::SetUp();
66 UpdateDisplay(base::StringPrintf("%dx%d", kRootWidth, kRootHeight)); 66 UpdateDisplay(base::StringPrintf("%dx%d", kRootWidth, kRootHeight));
67 67
68 #if defined(OS_WIN)
69 // RootWindow and Display can't resize on Windows Ash.
70 // http://crbug.com/165962
71 aura::Window* root = GetRootWindow();
72 gfx::Rect root_bounds(root->bounds());
73 EXPECT_EQ(kRootHeight, root_bounds.height());
74 EXPECT_EQ(kRootWidth, root_bounds.width());
75 #endif
76
77 GetMagnificationController()->DisableMoveMagnifierDelayForTesting(); 68 GetMagnificationController()->DisableMoveMagnifierDelayForTesting();
78 } 69 }
79 70
80 void TearDown() override { AshTestBase::TearDown(); } 71 void TearDown() override { AshTestBase::TearDown(); }
81 72
82 protected: 73 protected:
83 aura::Window* GetRootWindow() const { return Shell::GetPrimaryRootWindow(); } 74 aura::Window* GetRootWindow() const { return Shell::GetPrimaryRootWindow(); }
84 75
85 std::string GetHostMouseLocation() { 76 std::string GetHostMouseLocation() {
86 const gfx::Point& location = 77 const gfx::Point& location =
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 UpdateDisplay("500x500"); 697 UpdateDisplay("500x500");
707 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString()); 698 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString());
708 EXPECT_EQ(2.0f, GetMagnificationController()->GetScale()); 699 EXPECT_EQ(2.0f, GetMagnificationController()->GetScale());
709 700
710 GetMagnificationController()->SetEnabled(false); 701 GetMagnificationController()->SetEnabled(false);
711 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString()); 702 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString());
712 EXPECT_EQ(1.0f, GetMagnificationController()->GetScale()); 703 EXPECT_EQ(1.0f, GetMagnificationController()->GetScale());
713 } 704 }
714 705
715 } // namespace ash 706 } // namespace ash
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_drop_interactive_uitest.cc ('k') | ash/metrics/user_metrics_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698