OLD | NEW |
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 <string> | 5 #include <string> |
6 | 6 |
7 #include "ash/magnifier/magnification_controller.h" | 7 #include "ash/magnifier/magnification_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 magnifier_type_ = details.magnifier_type; | 135 magnifier_type_ = details.magnifier_type; |
136 observed_enabled_ = details.enabled; | 136 observed_enabled_ = details.enabled; |
137 observed_ = true; | 137 observed_ = true; |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 bool observed_; | 141 bool observed_; |
142 bool observed_enabled_; | 142 bool observed_enabled_; |
143 int magnifier_type_; | 143 int magnifier_type_; |
144 | 144 |
145 scoped_ptr<AccessibilityStatusSubscription> accessibility_subscription_; | 145 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; |
146 | 146 |
147 DISALLOW_COPY_AND_ASSIGN(MockMagnificationObserver); | 147 DISALLOW_COPY_AND_ASSIGN(MockMagnificationObserver); |
148 }; | 148 }; |
149 | 149 |
150 | 150 |
151 class MagnificationManagerTest : public InProcessBrowserTest { | 151 class MagnificationManagerTest : public InProcessBrowserTest { |
152 protected: | 152 protected: |
153 MagnificationManagerTest() {} | 153 MagnificationManagerTest() {} |
154 ~MagnificationManagerTest() override {} | 154 ~MagnificationManagerTest() override {} |
155 | 155 |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 observer.reset(); | 546 observer.reset(); |
547 | 547 |
548 // Set full screen magnifier again, and confirm the observer is not called. | 548 // Set full screen magnifier again, and confirm the observer is not called. |
549 SetMagnifierType(ui::MAGNIFIER_FULL); | 549 SetMagnifierType(ui::MAGNIFIER_FULL); |
550 EXPECT_FALSE(observer.observed()); | 550 EXPECT_FALSE(observer.observed()); |
551 EXPECT_EQ(GetMagnifierType(), ui::MAGNIFIER_FULL); | 551 EXPECT_EQ(GetMagnifierType(), ui::MAGNIFIER_FULL); |
552 observer.reset(); | 552 observer.reset(); |
553 } | 553 } |
554 | 554 |
555 } // namespace chromeos | 555 } // namespace chromeos |
OLD | NEW |