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

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

Issue 1326353002: Remove dependency of PrefSyncableService on Profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_model_associator
Patch Set: Fixing ChromeOS and Linux compilation Created 5 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/first_run/first_run.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/chrome_notification_types.h" 12 #include "chrome/browser/chrome_notification_types.h"
13 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 13 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
14 #include "chrome/browser/chromeos/login/helper.h" 14 #include "chrome/browser/chromeos/login/helper.h"
15 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 15 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
16 #include "chrome/browser/chromeos/preferences.h" 16 #include "chrome/browser/chromeos/preferences.h"
17 #include "chrome/browser/chromeos/profiles/profile_helper.h" 17 #include "chrome/browser/chromeos/profiles/profile_helper.h"
18 #include "chrome/browser/extensions/api/braille_display_private/mock_braille_con troller.h" 18 #include "chrome/browser/extensions/api/braille_display_private/mock_braille_con troller.h"
19 #include "chrome/browser/prefs/pref_service_syncable.h" 19 #include "chrome/browser/prefs/pref_service_syncable.h"
20 #include "chrome/browser/prefs/pref_service_syncable_util.h"
20 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/profiles/profile_manager.h" 22 #include "chrome/browser/profiles/profile_manager.h"
22 #include "chrome/common/extensions/extension_constants.h" 23 #include "chrome/common/extensions/extension_constants.h"
23 #include "chrome/common/pref_names.h" 24 #include "chrome/common/pref_names.h"
24 #include "chrome/test/base/in_process_browser_test.h" 25 #include "chrome/test/base/in_process_browser_test.h"
25 #include "chrome/test/base/testing_profile.h" 26 #include "chrome/test/base/testing_profile.h"
26 #include "chromeos/chromeos_switches.h" 27 #include "chromeos/chromeos_switches.h"
27 #include "chromeos/login/user_names.h" 28 #include "chromeos/login/user_names.h"
28 #include "components/user_manager/user_manager.h" 29 #include "components/user_manager/user_manager.h"
29 #include "content/public/browser/notification_service.h" 30 #include "content/public/browser/notification_service.h"
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 622
622 IN_PROC_BROWSER_TEST_P(AccessibilityManagerUserTypeTest, BrailleWhenLoggedIn) { 623 IN_PROC_BROWSER_TEST_P(AccessibilityManagerUserTypeTest, BrailleWhenLoggedIn) {
623 // Logs in. 624 // Logs in.
624 const char* user_name = GetParam(); 625 const char* user_name = GetParam();
625 user_manager::UserManager::Get()->UserLoggedIn(user_name, user_name, true); 626 user_manager::UserManager::Get()->UserLoggedIn(user_name, user_name, true);
626 user_manager::UserManager::Get()->SessionStarted(); 627 user_manager::UserManager::Get()->SessionStarted();
627 // This object watches for IME preference changes and reflects those in 628 // This object watches for IME preference changes and reflects those in
628 // the IME framework state. 629 // the IME framework state.
629 chromeos::Preferences prefs; 630 chromeos::Preferences prefs;
630 prefs.InitUserPrefsForTesting( 631 prefs.InitUserPrefsForTesting(
631 PrefServiceSyncable::FromProfile(GetProfile()), 632 PrefServiceSyncableFromProfile(GetProfile()),
632 user_manager::UserManager::Get()->GetActiveUser(), 633 user_manager::UserManager::Get()->GetActiveUser(),
633 UserSessionManager::GetInstance()->GetDefaultIMEState(GetProfile())); 634 UserSessionManager::GetInstance()->GetDefaultIMEState(GetProfile()));
634 635
635 // Make sure we start in the expected state. 636 // Make sure we start in the expected state.
636 EXPECT_FALSE(IsBrailleImeActive()); 637 EXPECT_FALSE(IsBrailleImeActive());
637 EXPECT_FALSE(IsSpokenFeedbackEnabled()); 638 EXPECT_FALSE(IsSpokenFeedbackEnabled());
638 639
639 // Signal the accessibility manager that a braille display was connected. 640 // Signal the accessibility manager that a braille display was connected.
640 SetBrailleDisplayAvailability(true); 641 SetBrailleDisplayAvailability(true);
641 642
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 EXPECT_FALSE(ShouldShowAccessibilityMenu()); 705 EXPECT_FALSE(ShouldShowAccessibilityMenu());
705 706
706 // Check on-screen keyboard. 707 // Check on-screen keyboard.
707 SetVirtualKeyboardEnabled(true); 708 SetVirtualKeyboardEnabled(true);
708 EXPECT_TRUE(ShouldShowAccessibilityMenu()); 709 EXPECT_TRUE(ShouldShowAccessibilityMenu());
709 SetVirtualKeyboardEnabled(false); 710 SetVirtualKeyboardEnabled(false);
710 EXPECT_FALSE(ShouldShowAccessibilityMenu()); 711 EXPECT_FALSE(ShouldShowAccessibilityMenu());
711 } 712 }
712 713
713 } // namespace chromeos 714 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698