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

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

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 | Annotate | Revision Log
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 <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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 bool GetScreenMagnifierEnabledFromPref() { 92 bool GetScreenMagnifierEnabledFromPref() {
93 return prefs()->GetBoolean(prefs::kAccessibilityScreenMagnifierEnabled); 93 return prefs()->GetBoolean(prefs::kAccessibilityScreenMagnifierEnabled);
94 } 94 }
95 95
96 // Creates and logs into a profile with account |name|, and makes sure that 96 // Creates and logs into a profile with account |name|, and makes sure that
97 // the profile is regarded as "non new" in the next login. This is used in 97 // the profile is regarded as "non new" in the next login. This is used in
98 // PRE_XXX cases so that in the main XXX case we can test non new profiles. 98 // PRE_XXX cases so that in the main XXX case we can test non new profiles.
99 void PrepareNonNewProfile(const std::string& name) { 99 void PrepareNonNewProfile(const std::string& name) {
100 UserManager::Get()->UserLoggedIn(name, name, true); 100 GetUserManager()->UserLoggedIn(name, name, true);
101 // To prepare a non-new profile for tests, we must ensure the profile 101 // To prepare a non-new profile for tests, we must ensure the profile
102 // directory and the preference files are created, because that's what 102 // directory and the preference files are created, because that's what
103 // Profile::IsNewProfile() checks. UserLoggedIn(), however, does not yet 103 // Profile::IsNewProfile() checks. UserLoggedIn(), however, does not yet
104 // create the profile directory until GetActiveUserProfile() is called. 104 // create the profile directory until GetActiveUserProfile() is called.
105 ProfileManager::GetActiveUserProfile(); 105 ProfileManager::GetActiveUserProfile();
106 } 106 }
107 107
108 } // namespace 108 } // namespace
109 109
110 class MockMagnificationObserver { 110 class MockMagnificationObserver {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToOff) { 179 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToOff) {
180 // Confirms that magnifier is disabled on the login screen. 180 // Confirms that magnifier is disabled on the login screen.
181 EXPECT_FALSE(IsMagnifierEnabled()); 181 EXPECT_FALSE(IsMagnifierEnabled());
182 182
183 // Disables magnifier on login screen. 183 // Disables magnifier on login screen.
184 SetMagnifierEnabled(false); 184 SetMagnifierEnabled(false);
185 EXPECT_FALSE(IsMagnifierEnabled()); 185 EXPECT_FALSE(IsMagnifierEnabled());
186 186
187 // Logs in with existing profile. 187 // Logs in with existing profile.
188 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 188 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
189 189
190 // Confirms that magnifier is still disabled just after login. 190 // Confirms that magnifier is still disabled just after login.
191 EXPECT_FALSE(IsMagnifierEnabled()); 191 EXPECT_FALSE(IsMagnifierEnabled());
192 192
193 UserManager::Get()->SessionStarted(); 193 GetUserManager()->SessionStarted();
194 194
195 // Confirms that magnifier is still disabled just after session starts. 195 // Confirms that magnifier is still disabled just after session starts.
196 EXPECT_FALSE(IsMagnifierEnabled()); 196 EXPECT_FALSE(IsMagnifierEnabled());
197 197
198 // Enables magnifier. 198 // Enables magnifier.
199 SetMagnifierEnabled(true); 199 SetMagnifierEnabled(true);
200 // Confirms that magnifier is enabled. 200 // Confirms that magnifier is enabled.
201 EXPECT_TRUE(IsMagnifierEnabled()); 201 EXPECT_TRUE(IsMagnifierEnabled());
202 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 202 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
203 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref()); 203 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
(...skipping 13 matching lines...) Expand all
217 217
218 // Enables magnifier on login screen. 218 // Enables magnifier on login screen.
219 SetMagnifierEnabled(true); 219 SetMagnifierEnabled(true);
220 SetMagnifierType(ash::MAGNIFIER_FULL); 220 SetMagnifierType(ash::MAGNIFIER_FULL);
221 SetFullScreenMagnifierScale(2.5); 221 SetFullScreenMagnifierScale(2.5);
222 EXPECT_TRUE(IsMagnifierEnabled()); 222 EXPECT_TRUE(IsMagnifierEnabled());
223 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 223 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
224 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 224 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
225 225
226 // Logs in (but the session is not started yet). 226 // Logs in (but the session is not started yet).
227 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 227 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
228 228
229 // Confirms that magnifier is keeping enabled. 229 // Confirms that magnifier is keeping enabled.
230 EXPECT_TRUE(IsMagnifierEnabled()); 230 EXPECT_TRUE(IsMagnifierEnabled());
231 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 231 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
232 232
233 UserManager::Get()->SessionStarted(); 233 GetUserManager()->SessionStarted();
234 234
235 // Confirms that magnifier is disabled just after session start. 235 // Confirms that magnifier is disabled just after session start.
236 EXPECT_FALSE(IsMagnifierEnabled()); 236 EXPECT_FALSE(IsMagnifierEnabled());
237 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref()); 237 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref());
238 } 238 }
239 239
240 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginOffToFull) { 240 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginOffToFull) {
241 // Create a new profile once, to run the test with non-new profile. 241 // Create a new profile once, to run the test with non-new profile.
242 PrepareNonNewProfile(kTestUserName); 242 PrepareNonNewProfile(kTestUserName);
243 243
244 // Sets prefs to explicitly enable the magnifier. 244 // Sets prefs to explicitly enable the magnifier.
245 SetScreenMagnifierEnabledPref(true); 245 SetScreenMagnifierEnabledPref(true);
246 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL); 246 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL);
247 SetFullScreenMagnifierScalePref(2.5); 247 SetFullScreenMagnifierScalePref(2.5);
248 } 248 }
249 249
250 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToFull) { 250 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToFull) {
251 // Disables magnifier on login screen. 251 // Disables magnifier on login screen.
252 SetMagnifierEnabled(false); 252 SetMagnifierEnabled(false);
253 EXPECT_FALSE(IsMagnifierEnabled()); 253 EXPECT_FALSE(IsMagnifierEnabled());
254 254
255 // Logs in (but the session is not started yet). 255 // Logs in (but the session is not started yet).
256 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 256 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
257 257
258 // Confirms that magnifier is keeping disabled. 258 // Confirms that magnifier is keeping disabled.
259 EXPECT_FALSE(IsMagnifierEnabled()); 259 EXPECT_FALSE(IsMagnifierEnabled());
260 260
261 UserManager::Get()->SessionStarted(); 261 GetUserManager()->SessionStarted();
262 262
263 // Confirms that the magnifier is enabled and configured according to the 263 // Confirms that the magnifier is enabled and configured according to the
264 // explicitly set prefs just after session start. 264 // explicitly set prefs just after session start.
265 EXPECT_TRUE(IsMagnifierEnabled()); 265 EXPECT_TRUE(IsMagnifierEnabled());
266 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 266 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
267 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 267 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
268 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref()); 268 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
269 } 269 }
270 270
271 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToFull) { 271 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToFull) {
272 // Create a new profile once, to run the test with non-new profile. 272 // Create a new profile once, to run the test with non-new profile.
273 PrepareNonNewProfile(kTestUserName); 273 PrepareNonNewProfile(kTestUserName);
274 274
275 // Sets prefs to explicitly enable the magnifier. 275 // Sets prefs to explicitly enable the magnifier.
276 SetScreenMagnifierEnabledPref(true); 276 SetScreenMagnifierEnabledPref(true);
277 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL); 277 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL);
278 SetFullScreenMagnifierScalePref(2.5); 278 SetFullScreenMagnifierScalePref(2.5);
279 } 279 }
280 280
281 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToFull) { 281 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToFull) {
282 // Enables magnifier on login screen. 282 // Enables magnifier on login screen.
283 SetMagnifierType(ash::MAGNIFIER_FULL); 283 SetMagnifierType(ash::MAGNIFIER_FULL);
284 SetMagnifierEnabled(true); 284 SetMagnifierEnabled(true);
285 SetFullScreenMagnifierScale(3.0); 285 SetFullScreenMagnifierScale(3.0);
286 EXPECT_TRUE(IsMagnifierEnabled()); 286 EXPECT_TRUE(IsMagnifierEnabled());
287 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 287 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
288 EXPECT_EQ(3.0, GetFullScreenMagnifierScale()); 288 EXPECT_EQ(3.0, GetFullScreenMagnifierScale());
289 289
290 // Logs in (but the session is not started yet). 290 // Logs in (but the session is not started yet).
291 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 291 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
292 292
293 // Confirms that magnifier is keeping enabled. 293 // Confirms that magnifier is keeping enabled.
294 EXPECT_TRUE(IsMagnifierEnabled()); 294 EXPECT_TRUE(IsMagnifierEnabled());
295 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 295 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
296 296
297 UserManager::Get()->SessionStarted(); 297 GetUserManager()->SessionStarted();
298 298
299 // Confirms that the magnifier is enabled and configured according to the 299 // Confirms that the magnifier is enabled and configured according to the
300 // explicitly set prefs just after session start. 300 // explicitly set prefs just after session start.
301 EXPECT_TRUE(IsMagnifierEnabled()); 301 EXPECT_TRUE(IsMagnifierEnabled());
302 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 302 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
303 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 303 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
304 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref()); 304 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
305 } 305 }
306 306
307 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToUnset) { 307 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToUnset) {
308 // Creates a new profile once, to run the test with non-new profile. 308 // Creates a new profile once, to run the test with non-new profile.
309 PrepareNonNewProfile(kTestUserName); 309 PrepareNonNewProfile(kTestUserName);
310 } 310 }
311 311
312 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToUnset) { 312 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToUnset) {
313 // Enables full screen magnifier. 313 // Enables full screen magnifier.
314 SetMagnifierType(ash::MAGNIFIER_FULL); 314 SetMagnifierType(ash::MAGNIFIER_FULL);
315 SetMagnifierEnabled(true); 315 SetMagnifierEnabled(true);
316 EXPECT_TRUE(IsMagnifierEnabled()); 316 EXPECT_TRUE(IsMagnifierEnabled());
317 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 317 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
318 318
319 // Logs in (but the session is not started yet). 319 // Logs in (but the session is not started yet).
320 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 320 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
321 321
322 // Confirms that magnifier is keeping enabled. 322 // Confirms that magnifier is keeping enabled.
323 EXPECT_TRUE(IsMagnifierEnabled()); 323 EXPECT_TRUE(IsMagnifierEnabled());
324 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 324 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
325 325
326 UserManager::Get()->SessionStarted(); 326 GetUserManager()->SessionStarted();
327 327
328 // Confirms that magnifier is disabled. 328 // Confirms that magnifier is disabled.
329 EXPECT_FALSE(IsMagnifierEnabled()); 329 EXPECT_FALSE(IsMagnifierEnabled());
330 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref()); 330 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref());
331 } 331 }
332 332
333 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserOff) { 333 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserOff) {
334 // Confirms that magnifier is disabled on the login screen. 334 // Confirms that magnifier is disabled on the login screen.
335 EXPECT_FALSE(IsMagnifierEnabled()); 335 EXPECT_FALSE(IsMagnifierEnabled());
336 336
337 // Disables magnifier on login screen explicitly. 337 // Disables magnifier on login screen explicitly.
338 SetMagnifierEnabled(false); 338 SetMagnifierEnabled(false);
339 339
340 // Logs in (but the session is not started yet). 340 // Logs in (but the session is not started yet).
341 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 341 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
342 342
343 // Confirms that magnifier is keeping disabled. 343 // Confirms that magnifier is keeping disabled.
344 EXPECT_FALSE(IsMagnifierEnabled()); 344 EXPECT_FALSE(IsMagnifierEnabled());
345 345
346 UserManager::Get()->SessionStarted(); 346 GetUserManager()->SessionStarted();
347 347
348 // Confirms that magnifier is keeping disabled. 348 // Confirms that magnifier is keeping disabled.
349 EXPECT_FALSE(IsMagnifierEnabled()); 349 EXPECT_FALSE(IsMagnifierEnabled());
350 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref()); 350 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref());
351 } 351 }
352 352
353 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserFull) { 353 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserFull) {
354 // Enables magnifier on login screen. 354 // Enables magnifier on login screen.
355 SetMagnifierType(ash::MAGNIFIER_FULL); 355 SetMagnifierType(ash::MAGNIFIER_FULL);
356 SetMagnifierEnabled(true); 356 SetMagnifierEnabled(true);
357 SetFullScreenMagnifierScale(2.5); 357 SetFullScreenMagnifierScale(2.5);
358 EXPECT_TRUE(IsMagnifierEnabled()); 358 EXPECT_TRUE(IsMagnifierEnabled());
359 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 359 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
360 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 360 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
361 361
362 // Logs in (but the session is not started yet). 362 // Logs in (but the session is not started yet).
363 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 363 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
364 364
365 // Confirms that magnifier is keeping enabled. 365 // Confirms that magnifier is keeping enabled.
366 EXPECT_TRUE(IsMagnifierEnabled()); 366 EXPECT_TRUE(IsMagnifierEnabled());
367 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 367 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
368 368
369 UserManager::Get()->SessionStarted(); 369 GetUserManager()->SessionStarted();
370 370
371 // Confirms that magnifier keeps enabled. 371 // Confirms that magnifier keeps enabled.
372 EXPECT_TRUE(IsMagnifierEnabled()); 372 EXPECT_TRUE(IsMagnifierEnabled());
373 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 373 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
374 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 374 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
375 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref()); 375 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
376 } 376 }
377 377
378 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserUnset) { 378 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserUnset) {
379 // Confirms that magnifier is disabled on the login screen. 379 // Confirms that magnifier is disabled on the login screen.
380 EXPECT_FALSE(IsMagnifierEnabled()); 380 EXPECT_FALSE(IsMagnifierEnabled());
381 381
382 // Logs in (but the session is not started yet). 382 // Logs in (but the session is not started yet).
383 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 383 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
384 384
385 // Confirms that magnifier is keeping disabled. 385 // Confirms that magnifier is keeping disabled.
386 EXPECT_FALSE(IsMagnifierEnabled()); 386 EXPECT_FALSE(IsMagnifierEnabled());
387 387
388 UserManager::Get()->SessionStarted(); 388 GetUserManager()->SessionStarted();
389 389
390 // Confirms that magnifier is keeping disabled. 390 // Confirms that magnifier is keeping disabled.
391 EXPECT_FALSE(IsMagnifierEnabled()); 391 EXPECT_FALSE(IsMagnifierEnabled());
392 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref()); 392 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref());
393 } 393 }
394 394
395 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, ChangeMagnifierType) { 395 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, ChangeMagnifierType) {
396 // Enables/disables full screen magnifier. 396 // Enables/disables full screen magnifier.
397 SetMagnifierEnabled(false); 397 SetMagnifierEnabled(false);
398 SetMagnifierType(ash::MAGNIFIER_FULL); 398 SetMagnifierType(ash::MAGNIFIER_FULL);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 EXPECT_FALSE(IsMagnifierEnabled()); 444 EXPECT_FALSE(IsMagnifierEnabled());
445 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 445 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
446 446
447 SetMagnifierType(ash::MAGNIFIER_FULL); 447 SetMagnifierType(ash::MAGNIFIER_FULL);
448 EXPECT_FALSE(IsMagnifierEnabled()); 448 EXPECT_FALSE(IsMagnifierEnabled());
449 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 449 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
450 } 450 }
451 451
452 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, TypePref) { 452 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, TypePref) {
453 // Logs in 453 // Logs in
454 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 454 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
455 UserManager::Get()->SessionStarted(); 455 GetUserManager()->SessionStarted();
456 456
457 // Confirms that magnifier is disabled just after login. 457 // Confirms that magnifier is disabled just after login.
458 EXPECT_FALSE(IsMagnifierEnabled()); 458 EXPECT_FALSE(IsMagnifierEnabled());
459 459
460 // Sets the pref as true to enable magnifier. 460 // Sets the pref as true to enable magnifier.
461 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL); 461 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL);
462 SetScreenMagnifierEnabledPref(true); 462 SetScreenMagnifierEnabledPref(true);
463 // Confirms that magnifier is enabled. 463 // Confirms that magnifier is enabled.
464 EXPECT_TRUE(IsMagnifierEnabled()); 464 EXPECT_TRUE(IsMagnifierEnabled());
465 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 465 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 observer.reset(); 535 observer.reset();
536 536
537 // Set full screen magnifier again, and confirm the observer is not called. 537 // Set full screen magnifier again, and confirm the observer is not called.
538 SetMagnifierType(ash::MAGNIFIER_FULL); 538 SetMagnifierType(ash::MAGNIFIER_FULL);
539 EXPECT_FALSE(observer.observed()); 539 EXPECT_FALSE(observer.observed());
540 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); 540 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL);
541 observer.reset(); 541 observer.reset();
542 } 542 }
543 543
544 } // namespace chromeos 544 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698