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

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

Issue 155573003: Add policy management for on-screen keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update recommendation restorer. Created 6 years, 10 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 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/magnifier/magnifier_constants.h" 7 #include "ash/magnifier/magnifier_constants.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 // Verify that the screen magnifier is disabled. 428 // Verify that the screen magnifier is disabled.
429 chromeos::MagnificationManager* magnification_manager = 429 chromeos::MagnificationManager* magnification_manager =
430 chromeos::MagnificationManager::Get(); 430 chromeos::MagnificationManager::Get();
431 ASSERT_TRUE(magnification_manager); 431 ASSERT_TRUE(magnification_manager);
432 EXPECT_FALSE(magnification_manager->IsMagnifierEnabled()); 432 EXPECT_FALSE(magnification_manager->IsMagnifierEnabled());
433 EXPECT_EQ(ash::kDefaultMagnifierType, 433 EXPECT_EQ(ash::kDefaultMagnifierType,
434 magnification_manager->GetMagnifierType()); 434 magnification_manager->GetMagnifierType());
435 } 435 }
436 436
437 IN_PROC_BROWSER_TEST_F(LoginScreenDefaultPolicyLoginScreenBrowsertest,
438 DeviceLoginScreenDefaultVirtualKeyboardEnabled) {
439 // Verifies that the default state of the on-screen keyboard accessibility
440 // feature on the login screen can be controlled through device policy.
441
442 // Enable the on-screen keyboard through device policy and wait for the change
443 // to take effect.
444 em::ChromeDeviceSettingsProto& proto(device_policy()->payload());
445 proto.mutable_accessibility_settings()->
446 set_login_screen_default_virtual_keyboard_enabled(true);
447 RefreshDevicePolicyAndWaitForPrefChange(prefs::kVirtualKeyboardEnabled);
448
449 // Verify that the pref which controls the on-screen keyboard in the login
450 // profile has changed to the policy-supplied default.
451 VerifyPrefFollowsRecommendation(prefs::kVirtualKeyboardEnabled,
452 base::FundamentalValue(true));
453
454 // Verify that the on-screen keyboard is enabled.
455 chromeos::AccessibilityManager* accessibility_manager =
456 chromeos::AccessibilityManager::Get();
457 ASSERT_TRUE(accessibility_manager);
458 EXPECT_TRUE(accessibility_manager->IsVirtualKeyboardEnabled());
459 }
460
437 } // namespace policy 461 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698