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

Side by Side Diff: chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc

Issue 11412264: Fixed full screen magnifier switching in oobe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/accessibility/magnification_manager.cc ('k') | no next file » | 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) 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 7 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
8 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 8 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
9 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" 9 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h"
10 #include "chrome/browser/chromeos/login/helper.h" 10 #include "chrome/browser/chromeos/login/helper.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void CheckCurrentMagnifierType( 51 void CheckCurrentMagnifierType(
52 ash::MagnifierType type) { 52 ash::MagnifierType type) {
53 EXPECT_EQ(MagnificationManager::GetInstance()->GetMagnifierType(), 53 EXPECT_EQ(MagnificationManager::GetInstance()->GetMagnifierType(),
54 type); 54 type);
55 } 55 }
56 56
57 DISALLOW_COPY_AND_ASSIGN(MagnificationManagerTest); 57 DISALLOW_COPY_AND_ASSIGN(MagnificationManagerTest);
58 }; 58 };
59 59
60 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, Login) { 60 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, Login) {
61 // Confirms that magnifier is enabled on the login screen. 61 // Confirms that magnifier is disabled on the login screen.
62 CheckCurrentMagnifierType(ash::MAGNIFIER_FULL); 62 CheckCurrentMagnifierType(ash::MAGNIFIER_OFF);
63 63
64 // Logs in. 64 // Logs in.
65 UserManager::Get()->UserLoggedIn("owner@invalid.domain", true); 65 UserManager::Get()->UserLoggedIn("owner@invalid.domain", true);
66 UserManager::Get()->SessionStarted(); 66 UserManager::Get()->SessionStarted();
67 67
68 // Confirms that magnifier is disabled just after login. 68 // Confirms that magnifier is still disabled just after login.
69 CheckCurrentMagnifierType(ash::MAGNIFIER_OFF); 69 CheckCurrentMagnifierType(ash::MAGNIFIER_OFF);
70 70
71 // Enables magnifier. 71 // Enables magnifier.
72 SetScreenManagnifierTypeToPref(ash::MAGNIFIER_FULL); 72 SetScreenManagnifierTypeToPref(ash::MAGNIFIER_FULL);
73 73
74 // Confirms that magnifier is enabled. 74 // Confirms that magnifier is enabled.
75 CheckCurrentMagnifierType(ash::MAGNIFIER_FULL); 75 CheckCurrentMagnifierType(ash::MAGNIFIER_FULL);
76 } 76 }
77 77
78 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, WorkingWithPref) { 78 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, WorkingWithPref) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 SetScreenManagnifierTypeToPref(ash::MAGNIFIER_FULL); 110 SetScreenManagnifierTypeToPref(ash::MAGNIFIER_FULL);
111 111
112 // Logs in. 112 // Logs in.
113 UserManager::Get()->SessionStarted(); 113 UserManager::Get()->SessionStarted();
114 114
115 // Confirms that magnifier is enabled just after login. 115 // Confirms that magnifier is enabled just after login.
116 CheckCurrentMagnifierType(ash::MAGNIFIER_FULL); 116 CheckCurrentMagnifierType(ash::MAGNIFIER_FULL);
117 } 117 }
118 118
119 } // namespace chromeos 119 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/accessibility/magnification_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698