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

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

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698