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

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

Issue 389913002: Moving IME manifests to chrome resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modified per comments. 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
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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 EXPECT_TRUE(GetHighContrastEnabledFromPref()); 612 EXPECT_TRUE(GetHighContrastEnabledFromPref());
613 EXPECT_TRUE(GetAutoclickEnabledFromPref()); 613 EXPECT_TRUE(GetAutoclickEnabledFromPref());
614 EXPECT_EQ(kTestAutoclickDelayMs, GetAutoclickDelayFromPref()); 614 EXPECT_EQ(kTestAutoclickDelayMs, GetAutoclickDelayFromPref());
615 } 615 }
616 616
617 IN_PROC_BROWSER_TEST_P(AccessibilityManagerUserTypeTest, BrailleWhenLoggedIn) { 617 IN_PROC_BROWSER_TEST_P(AccessibilityManagerUserTypeTest, BrailleWhenLoggedIn) {
618 // Logs in. 618 // Logs in.
619 const char* user_name = GetParam(); 619 const char* user_name = GetParam();
620 UserManager::Get()->UserLoggedIn(user_name, user_name, true); 620 UserManager::Get()->UserLoggedIn(user_name, user_name, true);
621 UserManager::Get()->SessionStarted(); 621 UserManager::Get()->SessionStarted();
622 // The |ComponentExtensionIMEManager| defers some initialization to the
623 // |FILE| thread. We need to wait for that to finish before continuing.
624 InputMethodManager* imm = InputMethodManager::Get();
625 while (!imm->GetComponentExtensionIMEManager()->IsInitialized()) {
626 content::RunAllPendingInMessageLoop(BrowserThread::FILE);
627 }
628 // This object watches for IME preference changes and reflects those in 622 // This object watches for IME preference changes and reflects those in
629 // the IME framework state. 623 // the IME framework state.
630 chromeos::Preferences prefs; 624 chromeos::Preferences prefs;
631 prefs.InitUserPrefsForTesting(PrefServiceSyncable::FromProfile(GetProfile()), 625 prefs.InitUserPrefsForTesting(PrefServiceSyncable::FromProfile(GetProfile()),
632 UserManager::Get()->GetActiveUser()); 626 UserManager::Get()->GetActiveUser());
633 627
634 // Make sure we start in the expected state. 628 // Make sure we start in the expected state.
635 EXPECT_FALSE(IsBrailleImeActive()); 629 EXPECT_FALSE(IsBrailleImeActive());
636 EXPECT_FALSE(IsSpokenFeedbackEnabled()); 630 EXPECT_FALSE(IsSpokenFeedbackEnabled());
637 631
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 EXPECT_FALSE(ShouldShowAccessibilityMenu()); 696 EXPECT_FALSE(ShouldShowAccessibilityMenu());
703 697
704 // Check on-screen keyboard. 698 // Check on-screen keyboard.
705 SetVirtualKeyboardEnabled(true); 699 SetVirtualKeyboardEnabled(true);
706 EXPECT_TRUE(ShouldShowAccessibilityMenu()); 700 EXPECT_TRUE(ShouldShowAccessibilityMenu());
707 SetVirtualKeyboardEnabled(false); 701 SetVirtualKeyboardEnabled(false);
708 EXPECT_FALSE(ShouldShowAccessibilityMenu()); 702 EXPECT_FALSE(ShouldShowAccessibilityMenu());
709 } 703 }
710 704
711 } // namespace chromeos 705 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698