OLD | NEW |
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 "chrome/browser/chromeos/accessibility/magnification_manager.h" | 5 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
6 | 6 |
7 #include "ash/magnifier/magnifier_constants.h" | 7 #include "ash/magnifier/magnifier_constants.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/common/pref_names.h" | |
11 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
13 | 12 |
14 namespace chromeos { | 13 namespace chromeos { |
15 namespace { | 14 namespace { |
16 | 15 |
17 void EnableMagnifier() { | 16 void EnableMagnifier() { |
18 return MagnificationManager::Get()->SetMagnifierEnabled(true); | 17 return MagnificationManager::Get()->SetMagnifierEnabled(true); |
19 } | 18 } |
20 | 19 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 EXPECT_TRUE(IsMagnifierEnabled()); | 67 EXPECT_TRUE(IsMagnifierEnabled()); |
69 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); | 68 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); |
70 | 69 |
71 // Disables magnifier, and confirm the status is set successfully. | 70 // Disables magnifier, and confirm the status is set successfully. |
72 DisableMagnifier(); | 71 DisableMagnifier(); |
73 EXPECT_FALSE(IsMagnifierEnabled()); | 72 EXPECT_FALSE(IsMagnifierEnabled()); |
74 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); | 73 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); |
75 } | 74 } |
76 | 75 |
77 } // namespace chromeos | 76 } // namespace chromeos |
OLD | NEW |