| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 size_t audioDecodedByteCount() const override { return 0; }; | 57 size_t audioDecodedByteCount() const override { return 0; }; |
| 58 size_t videoDecodedByteCount() const override { return 0; }; | 58 size_t videoDecodedByteCount() const override { return 0; }; |
| 59 void paint(WebCanvas*, const WebRect&, PaintFlags&) override{}; | 59 void paint(WebCanvas*, const WebRect&, PaintFlags&) override{}; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 class MockWebMediaPlayer : public EmptyWebMediaPlayer { | 62 class MockWebMediaPlayer : public EmptyWebMediaPlayer { |
| 63 public: | 63 public: |
| 64 MOCK_METHOD1(setBufferingStrategy, void(BufferingStrategy)); | 64 MOCK_METHOD1(setBufferingStrategy, void(BufferingStrategy)); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 class StubFrameLoaderClient : public EmptyFrameLoaderClient { | 67 class StubFrameLoaderClient : public EmptyLocalFrameClient { |
| 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 WTF::wrapUnique(new MockWebMediaPlayer); | 75 return WTF::wrapUnique(new MockWebMediaPlayer); |
| 76 } | 76 } |
| 77 }; | 77 }; |
| (...skipping 69 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 |