| OLD | NEW |
| 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 <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 lock_state_observer.Wait(); | 311 lock_state_observer.Wait(); |
| 312 ASSERT_FALSE(tester->IsLocked()); | 312 ASSERT_FALSE(tester->IsLocked()); |
| 313 } | 313 } |
| 314 | 314 |
| 315 protected: | 315 protected: |
| 316 void DisableAccessibilityManagerBraille() override { | 316 void DisableAccessibilityManagerBraille() override { |
| 317 // Let the accessibility manager behave as usual for these tests. | 317 // Let the accessibility manager behave as usual for these tests. |
| 318 } | 318 } |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 // Flakily times out on ChromeOS MSAN bots. See https://crbug.com/592893. |
| 322 #if defined(MEMORY_SANITIZER) |
| 323 #define MAYBE_KeyEventOnLockScreen DISABLED_KeyEventOnLockScreen |
| 324 #else |
| 325 #define MAYBE_KeyEventOnLockScreen KeyEventOnLockScreen |
| 326 #endif |
| 321 IN_PROC_BROWSER_TEST_F(BrailleDisplayPrivateAPIUserTest, | 327 IN_PROC_BROWSER_TEST_F(BrailleDisplayPrivateAPIUserTest, |
| 322 KeyEventOnLockScreen) { | 328 MAYBE_KeyEventOnLockScreen) { |
| 323 scoped_ptr<ScreenLockerTester> tester(ScreenLocker::GetTester()); | 329 scoped_ptr<ScreenLockerTester> tester(ScreenLocker::GetTester()); |
| 324 // Log in. | 330 // Log in. |
| 325 user_manager::UserManager::Get()->UserLoggedIn( | 331 user_manager::UserManager::Get()->UserLoggedIn( |
| 326 AccountId::FromUserEmail(kTestUserName), kTestUserName, true); | 332 AccountId::FromUserEmail(kTestUserName), kTestUserName, true); |
| 327 user_manager::UserManager::Get()->SessionStarted(); | 333 user_manager::UserManager::Get()->SessionStarted(); |
| 328 Profile* profile = ProfileManager::GetActiveUserProfile(); | 334 Profile* profile = ProfileManager::GetActiveUserProfile(); |
| 329 ASSERT_FALSE( | 335 ASSERT_FALSE( |
| 330 ProfileHelper::GetSigninProfile()->IsSameProfile(profile)) | 336 ProfileHelper::GetSigninProfile()->IsSameProfile(profile)) |
| 331 << ProfileHelper::GetSigninProfile()->GetDebugName() << " vs. " | 337 << ProfileHelper::GetSigninProfile()->GetDebugName() << " vs. " |
| 332 << profile->GetDebugName(); | 338 << profile->GetDebugName(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 359 DismissLockScreen(tester.get()); | 365 DismissLockScreen(tester.get()); |
| 360 signin_api.OnBrailleKeyEvent(key_event); | 366 signin_api.OnBrailleKeyEvent(key_event); |
| 361 user_api.OnBrailleKeyEvent(key_event); | 367 user_api.OnBrailleKeyEvent(key_event); |
| 362 EXPECT_EQ(1, signin_delegate->GetEventCount()); | 368 EXPECT_EQ(1, signin_delegate->GetEventCount()); |
| 363 EXPECT_EQ(2, user_delegate->GetEventCount()); | 369 EXPECT_EQ(2, user_delegate->GetEventCount()); |
| 364 } | 370 } |
| 365 | 371 |
| 366 } // namespace braille_display_private | 372 } // namespace braille_display_private |
| 367 } // namespace api | 373 } // namespace api |
| 368 } // namespace extensions | 374 } // namespace extensions |
| OLD | NEW |