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

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

Issue 2918203002: cros: Fix loading user profile w/o UserSessionManager (Closed)
Patch Set: rebase Created 3 years, 6 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
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/accessibility_types.h" 7 #include "ash/accessibility_types.h"
8 #include "ash/magnifier/magnification_controller.h" 8 #include "ash/magnifier/magnification_controller.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
14 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 14 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
15 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 15 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
16 #include "chrome/browser/chromeos/login/helper.h" 16 #include "chrome/browser/chromeos/login/helper.h"
17 #include "chrome/browser/chromeos/profiles/profile_helper.h"
17 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/profiles/profile_manager.h" 19 #include "chrome/browser/profiles/profile_manager.h"
19 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
21 #include "chrome/test/base/in_process_browser_test.h" 22 #include "chrome/test/base/in_process_browser_test.h"
22 #include "chrome/test/base/testing_profile.h" 23 #include "chrome/test/base/testing_profile.h"
23 #include "chromeos/chromeos_switches.h" 24 #include "chromeos/chromeos_switches.h"
24 #include "components/prefs/pref_service.h" 25 #include "components/prefs/pref_service.h"
25 #include "components/session_manager/core/session_manager.h" 26 #include "components/session_manager/core/session_manager.h"
26 #include "components/user_prefs/user_prefs.h" 27 #include "components/user_prefs/user_prefs.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 // Creates and logs into a profile with account |account_id|, and makes sure 96 // Creates and logs into a profile with account |account_id|, and makes sure
96 // that the profile is regarded as "non new" in the next login. This is used in 97 // that the profile is regarded as "non new" in the next login. This is used in
97 // 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.
98 void PrepareNonNewProfile(const AccountId& account_id) { 99 void PrepareNonNewProfile(const AccountId& account_id) {
99 session_manager::SessionManager::Get()->CreateSession( 100 session_manager::SessionManager::Get()->CreateSession(
100 account_id, account_id.GetUserEmail()); 101 account_id, account_id.GetUserEmail());
101 // To prepare a non-new profile for tests, we must ensure the profile 102 // 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 103 // directory and the preference files are created, because that's what
103 // Profile::IsNewProfile() checks. CreateSession(), however, does not yet 104 // Profile::IsNewProfile() checks. CreateSession(), however, does not yet
104 // create the profile directory until GetActiveUserProfile() is called. 105 // create the profile directory until GetProfileByUserIdHashForTest() is
105 ProfileManager::GetActiveUserProfile(); 106 // called.
107 ProfileHelper::Get()->GetProfileByUserIdHashForTest(
108 account_id.GetUserEmail());
109 }
110
111 // Simulates how UserSessionManager starts a user session by loading user
112 // profile and mark session as started.
113 void StartUserSession(const AccountId& account_id) {
114 ProfileHelper::GetProfileByUserIdHashForTest(
115 user_manager::UserManager::Get()->FindUser(account_id)->username_hash());
116
117 session_manager::SessionManager::Get()->SessionStarted();
106 } 118 }
107 119
108 } // namespace 120 } // namespace
109 121
110 class MockMagnificationObserver { 122 class MockMagnificationObserver {
111 public: 123 public:
112 MockMagnificationObserver() : observed_(false), 124 MockMagnificationObserver() : observed_(false),
113 observed_enabled_(false), 125 observed_enabled_(false),
114 magnifier_type_(-1) 126 magnifier_type_(-1)
115 { 127 {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 SetMagnifierEnabled(false); 198 SetMagnifierEnabled(false);
187 EXPECT_FALSE(IsMagnifierEnabled()); 199 EXPECT_FALSE(IsMagnifierEnabled());
188 200
189 // Logs in with existing profile. 201 // Logs in with existing profile.
190 session_manager::SessionManager::Get()->CreateSession(test_account_id_, 202 session_manager::SessionManager::Get()->CreateSession(test_account_id_,
191 kTestUserName); 203 kTestUserName);
192 204
193 // Confirms that magnifier is still disabled just after login. 205 // Confirms that magnifier is still disabled just after login.
194 EXPECT_FALSE(IsMagnifierEnabled()); 206 EXPECT_FALSE(IsMagnifierEnabled());
195 207
196 session_manager::SessionManager::Get()->SessionStarted(); 208 StartUserSession(test_account_id_);
197 209
198 // Confirms that magnifier is still disabled just after session starts. 210 // Confirms that magnifier is still disabled just after session starts.
199 EXPECT_FALSE(IsMagnifierEnabled()); 211 EXPECT_FALSE(IsMagnifierEnabled());
200 212
201 // Enables magnifier. 213 // Enables magnifier.
202 SetMagnifierEnabled(true); 214 SetMagnifierEnabled(true);
203 // Confirms that magnifier is enabled. 215 // Confirms that magnifier is enabled.
204 EXPECT_TRUE(IsMagnifierEnabled()); 216 EXPECT_TRUE(IsMagnifierEnabled());
205 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 217 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
206 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref()); 218 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
(...skipping 20 matching lines...) Expand all
227 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 239 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
228 240
229 // Logs in (but the session is not started yet). 241 // Logs in (but the session is not started yet).
230 session_manager::SessionManager::Get()->CreateSession(test_account_id_, 242 session_manager::SessionManager::Get()->CreateSession(test_account_id_,
231 kTestUserName); 243 kTestUserName);
232 244
233 // Confirms that magnifier is keeping enabled. 245 // Confirms that magnifier is keeping enabled.
234 EXPECT_TRUE(IsMagnifierEnabled()); 246 EXPECT_TRUE(IsMagnifierEnabled());
235 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 247 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
236 248
237 session_manager::SessionManager::Get()->SessionStarted(); 249 StartUserSession(test_account_id_);
238 250
239 // Confirms that magnifier is disabled just after session start. 251 // Confirms that magnifier is disabled just after session start.
240 EXPECT_FALSE(IsMagnifierEnabled()); 252 EXPECT_FALSE(IsMagnifierEnabled());
241 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref()); 253 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref());
242 } 254 }
243 255
244 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginOffToFull) { 256 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginOffToFull) {
245 // Create a new profile once, to run the test with non-new profile. 257 // Create a new profile once, to run the test with non-new profile.
246 PrepareNonNewProfile(test_account_id_); 258 PrepareNonNewProfile(test_account_id_);
247 259
248 // Sets prefs to explicitly enable the magnifier. 260 // Sets prefs to explicitly enable the magnifier.
249 SetScreenMagnifierEnabledPref(true); 261 SetScreenMagnifierEnabledPref(true);
250 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL); 262 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL);
251 SetFullScreenMagnifierScalePref(2.5); 263 SetFullScreenMagnifierScalePref(2.5);
252 } 264 }
253 265
254 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToFull) { 266 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToFull) {
255 // Disables magnifier on login screen. 267 // Disables magnifier on login screen.
256 SetMagnifierEnabled(false); 268 SetMagnifierEnabled(false);
257 EXPECT_FALSE(IsMagnifierEnabled()); 269 EXPECT_FALSE(IsMagnifierEnabled());
258 270
259 // Logs in (but the session is not started yet). 271 // Logs in (but the session is not started yet).
260 session_manager::SessionManager::Get()->CreateSession(test_account_id_, 272 session_manager::SessionManager::Get()->CreateSession(test_account_id_,
261 kTestUserName); 273 kTestUserName);
262 274
263 // Confirms that magnifier is keeping disabled. 275 // Confirms that magnifier is keeping disabled.
264 EXPECT_FALSE(IsMagnifierEnabled()); 276 EXPECT_FALSE(IsMagnifierEnabled());
265 277
266 session_manager::SessionManager::Get()->SessionStarted(); 278 StartUserSession(test_account_id_);
267 279
268 // Confirms that the magnifier is enabled and configured according to the 280 // Confirms that the magnifier is enabled and configured according to the
269 // explicitly set prefs just after session start. 281 // explicitly set prefs just after session start.
270 EXPECT_TRUE(IsMagnifierEnabled()); 282 EXPECT_TRUE(IsMagnifierEnabled());
271 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 283 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
272 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 284 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
273 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref()); 285 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
274 } 286 }
275 287
276 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToFull) { 288 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToFull) {
(...skipping 16 matching lines...) Expand all
293 EXPECT_EQ(3.0, GetFullScreenMagnifierScale()); 305 EXPECT_EQ(3.0, GetFullScreenMagnifierScale());
294 306
295 // Logs in (but the session is not started yet). 307 // Logs in (but the session is not started yet).
296 session_manager::SessionManager::Get()->CreateSession(test_account_id_, 308 session_manager::SessionManager::Get()->CreateSession(test_account_id_,
297 kTestUserName); 309 kTestUserName);
298 310
299 // Confirms that magnifier is keeping enabled. 311 // Confirms that magnifier is keeping enabled.
300 EXPECT_TRUE(IsMagnifierEnabled()); 312 EXPECT_TRUE(IsMagnifierEnabled());
301 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 313 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
302 314
303 session_manager::SessionManager::Get()->SessionStarted(); 315 StartUserSession(test_account_id_);
304 316
305 // Confirms that the magnifier is enabled and configured according to the 317 // Confirms that the magnifier is enabled and configured according to the
306 // explicitly set prefs just after session start. 318 // explicitly set prefs just after session start.
307 EXPECT_TRUE(IsMagnifierEnabled()); 319 EXPECT_TRUE(IsMagnifierEnabled());
308 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 320 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
309 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 321 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
310 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref()); 322 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
311 } 323 }
312 324
313 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToUnset) { 325 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToUnset) {
314 // Creates a new profile once, to run the test with non-new profile. 326 // Creates a new profile once, to run the test with non-new profile.
315 PrepareNonNewProfile(test_account_id_); 327 PrepareNonNewProfile(test_account_id_);
316 } 328 }
317 329
318 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToUnset) { 330 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToUnset) {
319 // Enables full screen magnifier. 331 // Enables full screen magnifier.
320 SetMagnifierType(ash::MAGNIFIER_FULL); 332 SetMagnifierType(ash::MAGNIFIER_FULL);
321 SetMagnifierEnabled(true); 333 SetMagnifierEnabled(true);
322 EXPECT_TRUE(IsMagnifierEnabled()); 334 EXPECT_TRUE(IsMagnifierEnabled());
323 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 335 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
324 336
325 // Logs in (but the session is not started yet). 337 // Logs in (but the session is not started yet).
326 session_manager::SessionManager::Get()->CreateSession(test_account_id_, 338 session_manager::SessionManager::Get()->CreateSession(test_account_id_,
327 kTestUserName); 339 kTestUserName);
328 340
329 // Confirms that magnifier is keeping enabled. 341 // Confirms that magnifier is keeping enabled.
330 EXPECT_TRUE(IsMagnifierEnabled()); 342 EXPECT_TRUE(IsMagnifierEnabled());
331 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 343 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
332 344
333 session_manager::SessionManager::Get()->SessionStarted(); 345 StartUserSession(test_account_id_);
334 346
335 // Confirms that magnifier is disabled. 347 // Confirms that magnifier is disabled.
336 EXPECT_FALSE(IsMagnifierEnabled()); 348 EXPECT_FALSE(IsMagnifierEnabled());
337 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref()); 349 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref());
338 } 350 }
339 351
340 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserOff) { 352 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserOff) {
341 // Confirms that magnifier is disabled on the login screen. 353 // Confirms that magnifier is disabled on the login screen.
342 EXPECT_FALSE(IsMagnifierEnabled()); 354 EXPECT_FALSE(IsMagnifierEnabled());
343 355
344 // Disables magnifier on login screen explicitly. 356 // Disables magnifier on login screen explicitly.
345 SetMagnifierEnabled(false); 357 SetMagnifierEnabled(false);
346 358
347 // Logs in (but the session is not started yet). 359 // Logs in (but the session is not started yet).
348 session_manager::SessionManager::Get()->CreateSession(test_account_id_, 360 session_manager::SessionManager::Get()->CreateSession(test_account_id_,
349 kTestUserName); 361 kTestUserName);
350 362
351 // Confirms that magnifier is keeping disabled. 363 // Confirms that magnifier is keeping disabled.
352 EXPECT_FALSE(IsMagnifierEnabled()); 364 EXPECT_FALSE(IsMagnifierEnabled());
353 365
354 session_manager::SessionManager::Get()->SessionStarted(); 366 StartUserSession(test_account_id_);
355 367
356 // Confirms that magnifier is keeping disabled. 368 // Confirms that magnifier is keeping disabled.
357 EXPECT_FALSE(IsMagnifierEnabled()); 369 EXPECT_FALSE(IsMagnifierEnabled());
358 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref()); 370 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref());
359 } 371 }
360 372
361 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserFull) { 373 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserFull) {
362 // Enables magnifier on login screen. 374 // Enables magnifier on login screen.
363 SetMagnifierType(ash::MAGNIFIER_FULL); 375 SetMagnifierType(ash::MAGNIFIER_FULL);
364 SetMagnifierEnabled(true); 376 SetMagnifierEnabled(true);
365 SetFullScreenMagnifierScale(2.5); 377 SetFullScreenMagnifierScale(2.5);
366 EXPECT_TRUE(IsMagnifierEnabled()); 378 EXPECT_TRUE(IsMagnifierEnabled());
367 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 379 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
368 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 380 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
369 381
370 // Logs in (but the session is not started yet). 382 // Logs in (but the session is not started yet).
371 session_manager::SessionManager::Get()->CreateSession(test_account_id_, 383 session_manager::SessionManager::Get()->CreateSession(test_account_id_,
372 kTestUserName); 384 kTestUserName);
373 385
374 // Confirms that magnifier is keeping enabled. 386 // Confirms that magnifier is keeping enabled.
375 EXPECT_TRUE(IsMagnifierEnabled()); 387 EXPECT_TRUE(IsMagnifierEnabled());
376 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 388 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
377 389
378 session_manager::SessionManager::Get()->SessionStarted(); 390 StartUserSession(test_account_id_);
379 391
380 // Confirms that magnifier keeps enabled. 392 // Confirms that magnifier keeps enabled.
381 EXPECT_TRUE(IsMagnifierEnabled()); 393 EXPECT_TRUE(IsMagnifierEnabled());
382 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 394 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
383 EXPECT_EQ(2.5, GetFullScreenMagnifierScale()); 395 EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
384 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref()); 396 EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
385 } 397 }
386 398
387 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserUnset) { 399 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserUnset) {
388 // Confirms that magnifier is disabled on the login screen. 400 // Confirms that magnifier is disabled on the login screen.
389 EXPECT_FALSE(IsMagnifierEnabled()); 401 EXPECT_FALSE(IsMagnifierEnabled());
390 402
391 // Logs in (but the session is not started yet). 403 // Logs in (but the session is not started yet).
392 session_manager::SessionManager::Get()->CreateSession(test_account_id_, 404 session_manager::SessionManager::Get()->CreateSession(test_account_id_,
393 kTestUserName); 405 kTestUserName);
394 406
395 // Confirms that magnifier is keeping disabled. 407 // Confirms that magnifier is keeping disabled.
396 EXPECT_FALSE(IsMagnifierEnabled()); 408 EXPECT_FALSE(IsMagnifierEnabled());
397 409
398 session_manager::SessionManager::Get()->SessionStarted(); 410 StartUserSession(test_account_id_);
399 411
400 // Confirms that magnifier is keeping disabled. 412 // Confirms that magnifier is keeping disabled.
401 EXPECT_FALSE(IsMagnifierEnabled()); 413 EXPECT_FALSE(IsMagnifierEnabled());
402 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref()); 414 EXPECT_FALSE(GetScreenMagnifierEnabledFromPref());
403 } 415 }
404 416
405 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, ChangeMagnifierType) { 417 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, ChangeMagnifierType) {
406 // Enables/disables full screen magnifier. 418 // Enables/disables full screen magnifier.
407 SetMagnifierEnabled(false); 419 SetMagnifierEnabled(false);
408 SetMagnifierType(ash::MAGNIFIER_FULL); 420 SetMagnifierType(ash::MAGNIFIER_FULL);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 468
457 SetMagnifierType(ash::MAGNIFIER_FULL); 469 SetMagnifierType(ash::MAGNIFIER_FULL);
458 EXPECT_FALSE(IsMagnifierEnabled()); 470 EXPECT_FALSE(IsMagnifierEnabled());
459 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 471 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
460 } 472 }
461 473
462 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, TypePref) { 474 IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, TypePref) {
463 // Logs in 475 // Logs in
464 session_manager::SessionManager::Get()->CreateSession(test_account_id_, 476 session_manager::SessionManager::Get()->CreateSession(test_account_id_,
465 kTestUserName); 477 kTestUserName);
466 session_manager::SessionManager::Get()->SessionStarted(); 478 StartUserSession(test_account_id_);
467 479
468 // Confirms that magnifier is disabled just after login. 480 // Confirms that magnifier is disabled just after login.
469 EXPECT_FALSE(IsMagnifierEnabled()); 481 EXPECT_FALSE(IsMagnifierEnabled());
470 482
471 // Sets the pref as true to enable magnifier. 483 // Sets the pref as true to enable magnifier.
472 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL); 484 SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL);
473 SetScreenMagnifierEnabledPref(true); 485 SetScreenMagnifierEnabledPref(true);
474 // Confirms that magnifier is enabled. 486 // Confirms that magnifier is enabled.
475 EXPECT_TRUE(IsMagnifierEnabled()); 487 EXPECT_TRUE(IsMagnifierEnabled());
476 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType()); 488 EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 observer.reset(); 558 observer.reset();
547 559
548 // Set full screen magnifier again, and confirm the observer is not called. 560 // Set full screen magnifier again, and confirm the observer is not called.
549 SetMagnifierType(ash::MAGNIFIER_FULL); 561 SetMagnifierType(ash::MAGNIFIER_FULL);
550 EXPECT_FALSE(observer.observed()); 562 EXPECT_FALSE(observer.observed());
551 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL); 563 EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL);
552 observer.reset(); 564 observer.reset();
553 } 565 }
554 566
555 } // namespace chromeos 567 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698