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

Side by Side Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp

Issue 2830713003: [Media controls] Add rotate-to-fullscreen gesture behind flag (Closed)
Patch Set: Use __func__ instead per styleguide Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "modules/media_controls/MediaControlsOrientationLockDelegate.h" 5 #include "modules/media_controls/MediaControlsOrientationLockDelegate.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/DocumentUserGestureToken.h" 8 #include "core/dom/DocumentUserGestureToken.h"
9 #include "core/dom/Fullscreen.h" 9 #include "core/dom/Fullscreen.h"
10 #include "core/frame/ScreenOrientationController.h" 10 #include "core/frame/ScreenOrientationController.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 }; 49 };
50 50
51 class StubLocalFrameClient : public EmptyLocalFrameClient { 51 class StubLocalFrameClient : public EmptyLocalFrameClient {
52 public: 52 public:
53 static StubLocalFrameClient* Create() { return new StubLocalFrameClient; } 53 static StubLocalFrameClient* Create() { return new StubLocalFrameClient; }
54 54
55 std::unique_ptr<WebMediaPlayer> CreateWebMediaPlayer( 55 std::unique_ptr<WebMediaPlayer> CreateWebMediaPlayer(
56 HTMLMediaElement&, 56 HTMLMediaElement&,
57 const WebMediaPlayerSource&, 57 const WebMediaPlayerSource&,
58 WebMediaPlayerClient*) override { 58 WebMediaPlayerClient*) override {
59 return WTF::WrapUnique(new MockVideoWebMediaPlayer()); 59 return WTF::MakeUnique<MockVideoWebMediaPlayer>();
60 } 60 }
61 }; 61 };
62 62
63 class MockScreenOrientationController final 63 class MockScreenOrientationController final
64 : public ScreenOrientationController { 64 : public ScreenOrientationController {
65 WTF_MAKE_NONCOPYABLE(MockScreenOrientationController); 65 WTF_MAKE_NONCOPYABLE(MockScreenOrientationController);
66 66
67 public: 67 public:
68 static MockScreenOrientationController* ProvideTo(LocalFrame& frame) { 68 static MockScreenOrientationController* ProvideTo(LocalFrame& frame) {
69 MockScreenOrientationController* controller = 69 MockScreenOrientationController* controller =
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 EXPECT_EQ(kWebScreenOrientationLockLandscape, ComputeOrientationLock()); 396 EXPECT_EQ(kWebScreenOrientationLockLandscape, ComputeOrientationLock());
397 397
398 screen_info.orientation_type = kWebScreenOrientationLandscapeSecondary; 398 screen_info.orientation_type = kWebScreenOrientationLandscapeSecondary;
399 EXPECT_CALL(ChromeClient(), GetScreenInfo()) 399 EXPECT_CALL(ChromeClient(), GetScreenInfo())
400 .Times(1) 400 .Times(1)
401 .WillOnce(Return(screen_info)); 401 .WillOnce(Return(screen_info));
402 EXPECT_EQ(kWebScreenOrientationLockLandscape, ComputeOrientationLock()); 402 EXPECT_EQ(kWebScreenOrientationLockLandscape, ComputeOrientationLock());
403 } 403 }
404 404
405 } // namespace blink 405 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698