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

Side by Side Diff: chrome/browser/chromeos/policy/login_screen_default_policy_browsertest.cc

Issue 2078393005: mash: Move accessibility_types.h from ui namespace to ash namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a11y
Patch Set: fix chromevox code generated from js Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 <string> 5 #include <string>
6 6
7 #include "ash/common/accessibility_types.h" 7 #include "ash/common/accessibility_types.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 proto.mutable_accessibility_settings()-> 320 proto.mutable_accessibility_settings()->
321 set_login_screen_default_screen_magnifier_type(kFullScreenMagnifier); 321 set_login_screen_default_screen_magnifier_type(kFullScreenMagnifier);
322 RefreshDevicePolicyAndWaitForPrefChange( 322 RefreshDevicePolicyAndWaitForPrefChange(
323 prefs::kAccessibilityScreenMagnifierType); 323 prefs::kAccessibilityScreenMagnifierType);
324 324
325 // Verify that the prefs which control the screen magnifier type have changed 325 // Verify that the prefs which control the screen magnifier type have changed
326 // to the policy-supplied default. 326 // to the policy-supplied default.
327 VerifyPrefFollowsRecommendation(prefs::kAccessibilityScreenMagnifierEnabled, 327 VerifyPrefFollowsRecommendation(prefs::kAccessibilityScreenMagnifierEnabled,
328 base::FundamentalValue(true)); 328 base::FundamentalValue(true));
329 VerifyPrefFollowsRecommendation(prefs::kAccessibilityScreenMagnifierType, 329 VerifyPrefFollowsRecommendation(prefs::kAccessibilityScreenMagnifierType,
330 base::FundamentalValue(ui::MAGNIFIER_FULL)); 330 base::FundamentalValue(ash::MAGNIFIER_FULL));
331 331
332 // Verify that the full-screen magnifier is enabled. 332 // Verify that the full-screen magnifier is enabled.
333 chromeos::MagnificationManager* magnification_manager = 333 chromeos::MagnificationManager* magnification_manager =
334 chromeos::MagnificationManager::Get(); 334 chromeos::MagnificationManager::Get();
335 ASSERT_TRUE(magnification_manager); 335 ASSERT_TRUE(magnification_manager);
336 EXPECT_TRUE(magnification_manager->IsMagnifierEnabled()); 336 EXPECT_TRUE(magnification_manager->IsMagnifierEnabled());
337 EXPECT_EQ(ui::MAGNIFIER_FULL, magnification_manager->GetMagnifierType()); 337 EXPECT_EQ(ash::MAGNIFIER_FULL, magnification_manager->GetMagnifierType());
338 } 338 }
339 339
340 IN_PROC_BROWSER_TEST_F(LoginScreenDefaultPolicyInSessionBrowsertest, 340 IN_PROC_BROWSER_TEST_F(LoginScreenDefaultPolicyInSessionBrowsertest,
341 DeviceLoginScreenDefaultLargeCursorEnabled) { 341 DeviceLoginScreenDefaultLargeCursorEnabled) {
342 // Verifies that changing the default state of the large cursor accessibility 342 // Verifies that changing the default state of the large cursor accessibility
343 // feature on the login screen through policy does not affect its state in a 343 // feature on the login screen through policy does not affect its state in a
344 // session. 344 // session.
345 345
346 // Enable the large cursor through device policy and wait for the change to 346 // Enable the large cursor through device policy and wait for the change to
347 // take effect. 347 // take effect.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 // Verify that the prefs which control the screen magnifier in the session are 428 // Verify that the prefs which control the screen magnifier in the session are
429 // unchanged. 429 // unchanged.
430 VerifyPrefFollowsDefault(prefs::kAccessibilityScreenMagnifierEnabled); 430 VerifyPrefFollowsDefault(prefs::kAccessibilityScreenMagnifierEnabled);
431 VerifyPrefFollowsDefault(prefs::kAccessibilityScreenMagnifierType); 431 VerifyPrefFollowsDefault(prefs::kAccessibilityScreenMagnifierType);
432 432
433 // Verify that the screen magnifier is disabled. 433 // Verify that the screen magnifier is disabled.
434 chromeos::MagnificationManager* magnification_manager = 434 chromeos::MagnificationManager* magnification_manager =
435 chromeos::MagnificationManager::Get(); 435 chromeos::MagnificationManager::Get();
436 ASSERT_TRUE(magnification_manager); 436 ASSERT_TRUE(magnification_manager);
437 EXPECT_FALSE(magnification_manager->IsMagnifierEnabled()); 437 EXPECT_FALSE(magnification_manager->IsMagnifierEnabled());
438 EXPECT_EQ(ui::kDefaultMagnifierType, 438 EXPECT_EQ(ash::kDefaultMagnifierType,
439 magnification_manager->GetMagnifierType()); 439 magnification_manager->GetMagnifierType());
440 } 440 }
441 441
442 IN_PROC_BROWSER_TEST_F(LoginScreenDefaultPolicyLoginScreenBrowsertest, 442 IN_PROC_BROWSER_TEST_F(LoginScreenDefaultPolicyLoginScreenBrowsertest,
443 DeviceLoginScreenDefaultVirtualKeyboardEnabled) { 443 DeviceLoginScreenDefaultVirtualKeyboardEnabled) {
444 // Verifies that the default state of the on-screen keyboard accessibility 444 // Verifies that the default state of the on-screen keyboard accessibility
445 // feature on the login screen can be controlled through device policy. 445 // feature on the login screen can be controlled through device policy.
446 446
447 // Enable the on-screen keyboard through device policy and wait for the change 447 // Enable the on-screen keyboard through device policy and wait for the change
448 // to take effect. 448 // to take effect.
449 em::ChromeDeviceSettingsProto& proto(device_policy()->payload()); 449 em::ChromeDeviceSettingsProto& proto(device_policy()->payload());
450 proto.mutable_accessibility_settings()-> 450 proto.mutable_accessibility_settings()->
451 set_login_screen_default_virtual_keyboard_enabled(true); 451 set_login_screen_default_virtual_keyboard_enabled(true);
452 RefreshDevicePolicyAndWaitForPrefChange( 452 RefreshDevicePolicyAndWaitForPrefChange(
453 prefs::kAccessibilityVirtualKeyboardEnabled); 453 prefs::kAccessibilityVirtualKeyboardEnabled);
454 454
455 // Verify that the pref which controls the on-screen keyboard in the login 455 // Verify that the pref which controls the on-screen keyboard in the login
456 // profile has changed to the policy-supplied default. 456 // profile has changed to the policy-supplied default.
457 VerifyPrefFollowsRecommendation(prefs::kAccessibilityVirtualKeyboardEnabled, 457 VerifyPrefFollowsRecommendation(prefs::kAccessibilityVirtualKeyboardEnabled,
458 base::FundamentalValue(true)); 458 base::FundamentalValue(true));
459 459
460 // Verify that the on-screen keyboard is enabled. 460 // Verify that the on-screen keyboard is enabled.
461 chromeos::AccessibilityManager* accessibility_manager = 461 chromeos::AccessibilityManager* accessibility_manager =
462 chromeos::AccessibilityManager::Get(); 462 chromeos::AccessibilityManager::Get();
463 ASSERT_TRUE(accessibility_manager); 463 ASSERT_TRUE(accessibility_manager);
464 EXPECT_TRUE(accessibility_manager->IsVirtualKeyboardEnabled()); 464 EXPECT_TRUE(accessibility_manager->IsVirtualKeyboardEnabled());
465 } 465 }
466 466
467 } // namespace policy 467 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698