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

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

Issue 393343002: Rename "managed (mode|user)" to "supervised user" (part 7) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more alphabetize (and rebase again) 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/chromeos/accessibility/accessibility_manager.h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 using extensions::api::braille_display_private::MockBrailleController; 42 using extensions::api::braille_display_private::MockBrailleController;
43 43
44 namespace chromeos { 44 namespace chromeos {
45 45
46 namespace { 46 namespace {
47 47
48 const char kTestUserName[] = "owner@invalid.domain"; 48 const char kTestUserName[] = "owner@invalid.domain";
49 49
50 const int kTestAutoclickDelayMs = 2000; 50 const int kTestAutoclickDelayMs = 2000;
51 51
52 // Test user name for locally managed user. The domain part must be matched 52 // Test user name for supervised user. The domain part must be matched with
53 // with chromeos::login::kLocallyManagedUserDomain. 53 // chromeos::login::kSupervisedUserDomain.
54 const char kTestLocallyManagedUserName[] = "test@locally-managed.localhost"; 54 const char kTestSupervisedUserName[] = "test@locally-managed.localhost";
55 55
56 class MockAccessibilityObserver { 56 class MockAccessibilityObserver {
57 public: 57 public:
58 MockAccessibilityObserver() : observed_(false), 58 MockAccessibilityObserver() : observed_(false),
59 observed_enabled_(false), 59 observed_enabled_(false),
60 observed_type_(-1) 60 observed_type_(-1)
61 { 61 {
62 AccessibilityManager* accessibility_manager = AccessibilityManager::Get(); 62 AccessibilityManager* accessibility_manager = AccessibilityManager::Get();
63 CHECK(accessibility_manager); 63 CHECK(accessibility_manager);
64 accessibility_subscription_ = accessibility_manager->RegisterCallback( 64 accessibility_subscription_ = accessibility_manager->RegisterCallback(
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 DISALLOW_COPY_AND_ASSIGN(AccessibilityManagerUserTypeTest); 559 DISALLOW_COPY_AND_ASSIGN(AccessibilityManagerUserTypeTest);
560 }; 560 };
561 561
562 // TODO(yoshiki): Enable a test for retail mode. 562 // TODO(yoshiki): Enable a test for retail mode.
563 INSTANTIATE_TEST_CASE_P( 563 INSTANTIATE_TEST_CASE_P(
564 UserTypeInstantiation, 564 UserTypeInstantiation,
565 AccessibilityManagerUserTypeTest, 565 AccessibilityManagerUserTypeTest,
566 ::testing::Values(kTestUserName, 566 ::testing::Values(kTestUserName,
567 chromeos::login::kGuestUserName, 567 chromeos::login::kGuestUserName,
568 // chromeos::login::kRetailModeUserName, 568 // chromeos::login::kRetailModeUserName,
569 kTestLocallyManagedUserName)); 569 kTestSupervisedUserName));
570 570
571 IN_PROC_BROWSER_TEST_P(AccessibilityManagerUserTypeTest, 571 IN_PROC_BROWSER_TEST_P(AccessibilityManagerUserTypeTest,
572 EnableOnLoginScreenAndLogin) { 572 EnableOnLoginScreenAndLogin) {
573 // Enables large cursor. 573 // Enables large cursor.
574 SetLargeCursorEnabled(true); 574 SetLargeCursorEnabled(true);
575 EXPECT_TRUE(IsLargeCursorEnabled()); 575 EXPECT_TRUE(IsLargeCursorEnabled());
576 // Enables spoken feedback. 576 // Enables spoken feedback.
577 SetSpokenFeedbackEnabled(true); 577 SetSpokenFeedbackEnabled(true);
578 EXPECT_TRUE(IsSpokenFeedbackEnabled()); 578 EXPECT_TRUE(IsSpokenFeedbackEnabled());
579 // Enables high contrast. 579 // Enables high contrast.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 EXPECT_FALSE(ShouldShowAccessibilityMenu()); 702 EXPECT_FALSE(ShouldShowAccessibilityMenu());
703 703
704 // Check on-screen keyboard. 704 // Check on-screen keyboard.
705 SetVirtualKeyboardEnabled(true); 705 SetVirtualKeyboardEnabled(true);
706 EXPECT_TRUE(ShouldShowAccessibilityMenu()); 706 EXPECT_TRUE(ShouldShowAccessibilityMenu());
707 SetVirtualKeyboardEnabled(false); 707 SetVirtualKeyboardEnabled(false);
708 EXPECT_FALSE(ShouldShowAccessibilityMenu()); 708 EXPECT_FALSE(ShouldShowAccessibilityMenu());
709 } 709 }
710 710
711 } // namespace chromeos 711 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698