| 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/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(MockMagnificationObserver); | 146 DISALLOW_COPY_AND_ASSIGN(MockMagnificationObserver); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 | 149 |
| 150 class MagnificationManagerTest : public InProcessBrowserTest { | 150 class MagnificationManagerTest : public InProcessBrowserTest { |
| 151 protected: | 151 protected: |
| 152 MagnificationManagerTest() {} | 152 MagnificationManagerTest() {} |
| 153 virtual ~MagnificationManagerTest() {} | 153 virtual ~MagnificationManagerTest() {} |
| 154 | 154 |
| 155 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 155 virtual void SetUpCommandLine(CommandLine* command_line) override { |
| 156 command_line->AppendSwitch(switches::kLoginManager); | 156 command_line->AppendSwitch(switches::kLoginManager); |
| 157 command_line->AppendSwitchASCII(switches::kLoginProfile, | 157 command_line->AppendSwitchASCII(switches::kLoginProfile, |
| 158 TestingProfile::kTestUserProfileDir); | 158 TestingProfile::kTestUserProfileDir); |
| 159 } | 159 } |
| 160 | 160 |
| 161 virtual void SetUpOnMainThread() OVERRIDE { | 161 virtual void SetUpOnMainThread() override { |
| 162 // Set the login-screen profile. | 162 // Set the login-screen profile. |
| 163 MagnificationManager::Get()->SetProfileForTest( | 163 MagnificationManager::Get()->SetProfileForTest( |
| 164 ProfileManager::GetActiveUserProfile()); | 164 ProfileManager::GetActiveUserProfile()); |
| 165 } | 165 } |
| 166 | 166 |
| 167 DISALLOW_COPY_AND_ASSIGN(MagnificationManagerTest); | 167 DISALLOW_COPY_AND_ASSIGN(MagnificationManagerTest); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginOffToOff) { | 170 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginOffToOff) { |
| 171 // Create a new profile once, to run the test with non-new profile. | 171 // Create a new profile once, to run the test with non-new profile. |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 observer.reset(); | 543 observer.reset(); |
| 544 | 544 |
| 545 // Set full screen magnifier again, and confirm the observer is not called. | 545 // Set full screen magnifier again, and confirm the observer is not called. |
| 546 SetMagnifierType(ash::MAGNIFIER_FULL); | 546 SetMagnifierType(ash::MAGNIFIER_FULL); |
| 547 EXPECT_FALSE(observer.observed()); | 547 EXPECT_FALSE(observer.observed()); |
| 548 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); | 548 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); |
| 549 observer.reset(); | 549 observer.reset(); |
| 550 } | 550 } |
| 551 | 551 |
| 552 } // namespace chromeos | 552 } // namespace chromeos |
| OLD | NEW |