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

Side by Side Diff: chrome/browser/extensions/api/braille_display_private/braille_display_private_apitest.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 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 #ifndef USE_BRLAPI 5 #ifndef USE_BRLAPI
6 #error This test requires brlapi. 6 #error This test requires brlapi.
7 #endif 7 #endif
8 8
9 #include <deque> 9 #include <deque>
10 10
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/profiles/profile_manager.h" 23 #include "chrome/browser/profiles/profile_manager.h"
24 #include "chrome/test/base/testing_profile.h" 24 #include "chrome/test/base/testing_profile.h"
25 #include "chromeos/chromeos_switches.h" 25 #include "chromeos/chromeos_switches.h"
26 #include "content/public/browser/browser_thread.h" 26 #include "content/public/browser/browser_thread.h"
27 #include "content/public/browser/notification_service.h" 27 #include "content/public/browser/notification_service.h"
28 #include "content/public/test/test_utils.h" 28 #include "content/public/test/test_utils.h"
29 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
30 30
31 using chromeos::ProfileHelper; 31 using chromeos::ProfileHelper;
32 using chromeos::ScreenLocker; 32 using chromeos::ScreenLocker;
33 using chromeos::UserManager; 33 using chromeos::UserManager;
Denis Kuznetsov (DE-MUC) 2014/07/09 18:33:10 Not needed anymore.
Nikita (slow) 2014/07/09 19:27:40 Done.
34 using chromeos::test::ScreenLockerTester; 34 using chromeos::test::ScreenLockerTester;
35 using content::BrowserThread; 35 using content::BrowserThread;
36 36
37 namespace extensions { 37 namespace extensions {
38 namespace api { 38 namespace api {
39 namespace braille_display_private { 39 namespace braille_display_private {
40 40
41 namespace { 41 namespace {
42 42
43 const char kTestUserName[] = "owner@invalid.domain"; 43 const char kTestUserName[] = "owner@invalid.domain";
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 protected: 320 protected:
321 virtual void DisableAccessibilityManagerBraille() OVERRIDE { 321 virtual void DisableAccessibilityManagerBraille() OVERRIDE {
322 // Let the accessibility manager behave as usual for these tests. 322 // Let the accessibility manager behave as usual for these tests.
323 } 323 }
324 }; 324 };
325 325
326 IN_PROC_BROWSER_TEST_F(BrailleDisplayPrivateAPIUserTest, 326 IN_PROC_BROWSER_TEST_F(BrailleDisplayPrivateAPIUserTest,
327 KeyEventOnLockScreen) { 327 KeyEventOnLockScreen) {
328 scoped_ptr<ScreenLockerTester> tester(ScreenLocker::GetTester()); 328 scoped_ptr<ScreenLockerTester> tester(ScreenLocker::GetTester());
329 // Log in. 329 // Log in.
330 UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true); 330 GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
Denis Kuznetsov (DE-MUC) 2014/07/09 18:33:10 need extra namespace qualification.
Nikita (slow) 2014/07/09 19:27:40 Done.
331 UserManager::Get()->SessionStarted(); 331 GetUserManager()->SessionStarted();
332 Profile* profile = ProfileManager::GetActiveUserProfile(); 332 Profile* profile = ProfileManager::GetActiveUserProfile();
333 ASSERT_FALSE( 333 ASSERT_FALSE(
334 ProfileHelper::GetSigninProfile()->IsSameProfile(profile)) 334 ProfileHelper::GetSigninProfile()->IsSameProfile(profile))
335 << ProfileHelper::GetSigninProfile()->GetDebugName() << " vs. " 335 << ProfileHelper::GetSigninProfile()->GetDebugName() << " vs. "
336 << profile->GetDebugName(); 336 << profile->GetDebugName();
337 337
338 // Create API and event delegate for sign in profile. 338 // Create API and event delegate for sign in profile.
339 BrailleDisplayPrivateAPI signin_api(ProfileHelper::GetSigninProfile()); 339 BrailleDisplayPrivateAPI signin_api(ProfileHelper::GetSigninProfile());
340 MockEventDelegate* signin_delegate = SetMockEventDelegate(&signin_api); 340 MockEventDelegate* signin_delegate = SetMockEventDelegate(&signin_api);
341 EXPECT_EQ(0, signin_delegate->GetEventCount()); 341 EXPECT_EQ(0, signin_delegate->GetEventCount());
(...skipping 21 matching lines...) Expand all
363 DismissLockScreen(tester.get()); 363 DismissLockScreen(tester.get());
364 signin_api.OnBrailleKeyEvent(key_event); 364 signin_api.OnBrailleKeyEvent(key_event);
365 user_api.OnBrailleKeyEvent(key_event); 365 user_api.OnBrailleKeyEvent(key_event);
366 EXPECT_EQ(1, signin_delegate->GetEventCount()); 366 EXPECT_EQ(1, signin_delegate->GetEventCount());
367 EXPECT_EQ(2, user_delegate->GetEventCount()); 367 EXPECT_EQ(2, user_delegate->GetEventCount());
368 } 368 }
369 369
370 } // namespace braille_display_private 370 } // namespace braille_display_private
371 } // namespace api 371 } // namespace api
372 } // namespace extensions 372 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698