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

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

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 void DisableAccessibilityManagerBraille() override { 314 void DisableAccessibilityManagerBraille() override {
315 // Let the accessibility manager behave as usual for these tests. 315 // Let the accessibility manager behave as usual for these tests.
316 } 316 }
317 }; 317 };
318 318
319 IN_PROC_BROWSER_TEST_F(BrailleDisplayPrivateAPIUserTest, 319 IN_PROC_BROWSER_TEST_F(BrailleDisplayPrivateAPIUserTest,
320 KeyEventOnLockScreen) { 320 KeyEventOnLockScreen) {
321 scoped_ptr<ScreenLockerTester> tester(ScreenLocker::GetTester()); 321 scoped_ptr<ScreenLockerTester> tester(ScreenLocker::GetTester());
322 // Log in. 322 // Log in.
323 user_manager::UserManager::Get()->UserLoggedIn( 323 user_manager::UserManager::Get()->UserLoggedIn(
324 kTestUserName, kTestUserName, true); 324 AccountId::FromUserEmail(kTestUserName), kTestUserName, true);
325 user_manager::UserManager::Get()->SessionStarted(); 325 user_manager::UserManager::Get()->SessionStarted();
326 Profile* profile = ProfileManager::GetActiveUserProfile(); 326 Profile* profile = ProfileManager::GetActiveUserProfile();
327 ASSERT_FALSE( 327 ASSERT_FALSE(
328 ProfileHelper::GetSigninProfile()->IsSameProfile(profile)) 328 ProfileHelper::GetSigninProfile()->IsSameProfile(profile))
329 << ProfileHelper::GetSigninProfile()->GetDebugName() << " vs. " 329 << ProfileHelper::GetSigninProfile()->GetDebugName() << " vs. "
330 << profile->GetDebugName(); 330 << profile->GetDebugName();
331 331
332 // Create API and event delegate for sign in profile. 332 // Create API and event delegate for sign in profile.
333 BrailleDisplayPrivateAPI signin_api(ProfileHelper::GetSigninProfile()); 333 BrailleDisplayPrivateAPI signin_api(ProfileHelper::GetSigninProfile());
334 MockEventDelegate* signin_delegate = SetMockEventDelegate(&signin_api); 334 MockEventDelegate* signin_delegate = SetMockEventDelegate(&signin_api);
(...skipping 22 matching lines...) Expand all
357 DismissLockScreen(tester.get()); 357 DismissLockScreen(tester.get());
358 signin_api.OnBrailleKeyEvent(key_event); 358 signin_api.OnBrailleKeyEvent(key_event);
359 user_api.OnBrailleKeyEvent(key_event); 359 user_api.OnBrailleKeyEvent(key_event);
360 EXPECT_EQ(1, signin_delegate->GetEventCount()); 360 EXPECT_EQ(1, signin_delegate->GetEventCount());
361 EXPECT_EQ(2, user_delegate->GetEventCount()); 361 EXPECT_EQ(2, user_delegate->GetEventCount());
362 } 362 }
363 363
364 } // namespace braille_display_private 364 } // namespace braille_display_private
365 } // namespace api 365 } // namespace api
366 } // namespace extensions 366 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698