OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/html/HTMLVideoElement.h" | 5 #include "core/html/HTMLVideoElement.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/loader/EmptyClients.h" | 9 #include "core/loader/EmptyClients.h" |
10 #include "core/page/NetworkStateNotifier.h" | 10 #include "core/page/NetworkStateNotifier.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 }; | 65 }; |
66 | 66 |
67 class StubFrameLoaderClient : public EmptyFrameLoaderClient { | 67 class StubFrameLoaderClient : public EmptyFrameLoaderClient { |
68 public: | 68 public: |
69 static StubFrameLoaderClient* create() { return new StubFrameLoaderClient; } | 69 static StubFrameLoaderClient* create() { return new StubFrameLoaderClient; } |
70 | 70 |
71 std::unique_ptr<WebMediaPlayer> createWebMediaPlayer( | 71 std::unique_ptr<WebMediaPlayer> createWebMediaPlayer( |
72 HTMLMediaElement&, | 72 HTMLMediaElement&, |
73 const WebMediaPlayerSource&, | 73 const WebMediaPlayerSource&, |
74 WebMediaPlayerClient*) override { | 74 WebMediaPlayerClient*) override { |
75 return wrapUnique(new MockWebMediaPlayer); | 75 return WTF::wrapUnique(new MockWebMediaPlayer); |
76 } | 76 } |
77 }; | 77 }; |
78 | 78 |
79 } // namespace | 79 } // namespace |
80 | 80 |
81 class HTMLVideoElementTest : public ::testing::Test { | 81 class HTMLVideoElementTest : public ::testing::Test { |
82 protected: | 82 protected: |
83 HTMLVideoElementTest() | 83 HTMLVideoElementTest() |
84 : m_dummyPageHolder( | 84 : m_dummyPageHolder( |
85 DummyPageHolder::create(IntSize(640, 360), | 85 DummyPageHolder::create(IntSize(640, 360), |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 ::testing::Mock::VerifyAndClearExpectations(player); | 147 ::testing::Mock::VerifyAndClearExpectations(player); |
148 | 148 |
149 // On play, the strategy is set to normal. | 149 // On play, the strategy is set to normal. |
150 EXPECT_CALL(*player, | 150 EXPECT_CALL(*player, |
151 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal)); | 151 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal)); |
152 m_video->play(); | 152 m_video->play(); |
153 ::testing::Mock::VerifyAndClearExpectations(player); | 153 ::testing::Mock::VerifyAndClearExpectations(player); |
154 } | 154 } |
155 | 155 |
156 } // namespace blink | 156 } // namespace blink |
OLD | NEW |