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

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

Issue 1556783002: Convert Pass()→std::move() for CrOS extension code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 void BroadcastEvent(scoped_ptr<Event> event) override { ++event_count_; } 280 void BroadcastEvent(scoped_ptr<Event> event) override { ++event_count_; }
281 bool HasListener() override { return true; } 281 bool HasListener() override { return true; }
282 282
283 private: 283 private:
284 int event_count_; 284 int event_count_;
285 }; 285 };
286 286
287 MockEventDelegate* SetMockEventDelegate(BrailleDisplayPrivateAPI* api) { 287 MockEventDelegate* SetMockEventDelegate(BrailleDisplayPrivateAPI* api) {
288 MockEventDelegate* delegate = new MockEventDelegate(); 288 MockEventDelegate* delegate = new MockEventDelegate();
289 api->SetEventDelegateForTest( 289 api->SetEventDelegateForTest(
290 scoped_ptr<BrailleDisplayPrivateAPI::EventDelegate>(delegate).Pass()); 290 scoped_ptr<BrailleDisplayPrivateAPI::EventDelegate>(delegate));
291 return delegate; 291 return delegate;
292 } 292 }
293 293
294 void LockScreen(ScreenLockerTester* tester) { 294 void LockScreen(ScreenLockerTester* tester) {
295 ScreenLocker::Show(); 295 ScreenLocker::Show();
296 tester->EmulateWindowManagerReady(); 296 tester->EmulateWindowManagerReady();
297 content::WindowedNotificationObserver lock_state_observer( 297 content::WindowedNotificationObserver lock_state_observer(
298 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, 298 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
299 content::NotificationService::AllSources()); 299 content::NotificationService::AllSources());
300 if (!tester->IsLocked()) 300 if (!tester->IsLocked())
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 DismissLockScreen(tester.get()); 359 DismissLockScreen(tester.get());
360 signin_api.OnBrailleKeyEvent(key_event); 360 signin_api.OnBrailleKeyEvent(key_event);
361 user_api.OnBrailleKeyEvent(key_event); 361 user_api.OnBrailleKeyEvent(key_event);
362 EXPECT_EQ(1, signin_delegate->GetEventCount()); 362 EXPECT_EQ(1, signin_delegate->GetEventCount());
363 EXPECT_EQ(2, user_delegate->GetEventCount()); 363 EXPECT_EQ(2, user_delegate->GetEventCount());
364 } 364 }
365 365
366 } // namespace braille_display_private 366 } // namespace braille_display_private
367 } // namespace api 367 } // namespace api
368 } // namespace extensions 368 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698