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 <deque> | 9 #include <deque> |
10 | 10 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 IN_PROC_BROWSER_TEST_F(BrailleDisplayPrivateApiTest, DisplayStateChanges) { | 261 IN_PROC_BROWSER_TEST_F(BrailleDisplayPrivateApiTest, DisplayStateChanges) { |
262 connection_data_.display_size = 11; | 262 connection_data_.display_size = 11; |
263 connection_data_.pending_keys.push_back(kErrorKeyCode); | 263 connection_data_.pending_keys.push_back(kErrorKeyCode); |
264 connection_data_.reappear_on_disconnect = true; | 264 connection_data_.reappear_on_disconnect = true; |
265 ASSERT_TRUE(RunComponentExtensionTest( | 265 ASSERT_TRUE(RunComponentExtensionTest( |
266 "braille_display_private/display_state_changes")); | 266 "braille_display_private/display_state_changes")); |
267 } | 267 } |
268 | 268 |
269 class BrailleDisplayPrivateAPIUserTest : public BrailleDisplayPrivateApiTest { | 269 class BrailleDisplayPrivateAPIUserTest : public BrailleDisplayPrivateApiTest { |
270 public: | 270 public: |
271 virtual void SetUpCommandLine(CommandLine* command_line) override { | 271 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
272 command_line->AppendSwitch(chromeos::switches::kLoginManager); | 272 command_line->AppendSwitch(chromeos::switches::kLoginManager); |
273 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, | 273 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, |
274 TestingProfile::kTestUserProfileDir); | 274 TestingProfile::kTestUserProfileDir); |
275 } | 275 } |
276 | 276 |
277 class MockEventDelegate : public BrailleDisplayPrivateAPI::EventDelegate { | 277 class MockEventDelegate : public BrailleDisplayPrivateAPI::EventDelegate { |
278 public: | 278 public: |
279 MockEventDelegate() : event_count_(0) {} | 279 MockEventDelegate() : event_count_(0) {} |
280 | 280 |
281 int GetEventCount() { return event_count_; } | 281 int GetEventCount() { return event_count_; } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 DismissLockScreen(tester.get()); | 364 DismissLockScreen(tester.get()); |
365 signin_api.OnBrailleKeyEvent(key_event); | 365 signin_api.OnBrailleKeyEvent(key_event); |
366 user_api.OnBrailleKeyEvent(key_event); | 366 user_api.OnBrailleKeyEvent(key_event); |
367 EXPECT_EQ(1, signin_delegate->GetEventCount()); | 367 EXPECT_EQ(1, signin_delegate->GetEventCount()); |
368 EXPECT_EQ(2, user_delegate->GetEventCount()); | 368 EXPECT_EQ(2, user_delegate->GetEventCount()); |
369 } | 369 } |
370 | 370 |
371 } // namespace braille_display_private | 371 } // namespace braille_display_private |
372 } // namespace api | 372 } // namespace api |
373 } // namespace extensions | 373 } // namespace extensions |
OLD | NEW |