| 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/loader/EmptyClients.h" | 8 #include "core/loader/EmptyClients.h" |
| 9 #include "core/page/NetworkStateNotifier.h" | 9 #include "core/page/NetworkStateNotifier.h" |
| 10 #include "core/testing/DummyPageHolder.h" | 10 #include "core/testing/DummyPageHolder.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 double duration() const override { return 0.0; }; | 39 double duration() const override { return 0.0; }; |
| 40 double currentTime() const override { return 0.0; }; | 40 double currentTime() const override { return 0.0; }; |
| 41 NetworkState networkState() const override { return NetworkStateEmpty; }; | 41 NetworkState networkState() const override { return NetworkStateEmpty; }; |
| 42 ReadyState readyState() const override { return ReadyStateHaveNothing; }; | 42 ReadyState readyState() const override { return ReadyStateHaveNothing; }; |
| 43 bool didLoadingProgress() override { return false; }; | 43 bool didLoadingProgress() override { return false; }; |
| 44 bool hasSingleSecurityOrigin() const override { return true; }; | 44 bool hasSingleSecurityOrigin() const override { return true; }; |
| 45 bool didPassCORSAccessCheck() const override { return true; }; | 45 bool didPassCORSAccessCheck() const override { return true; }; |
| 46 double mediaTimeForTimeValue(double timeValue) const override { return timeV
alue; }; | 46 double mediaTimeForTimeValue(double timeValue) const override { return timeV
alue; }; |
| 47 unsigned decodedFrameCount() const override { return 0; }; | 47 unsigned decodedFrameCount() const override { return 0; }; |
| 48 unsigned droppedFrameCount() const override { return 0; }; | 48 unsigned droppedFrameCount() const override { return 0; }; |
| 49 unsigned audioDecodedByteCount() const override { return 0; }; | 49 size_t audioDecodedByteCount() const override { return 0; }; |
| 50 unsigned videoDecodedByteCount() const override { return 0; }; | 50 size_t videoDecodedByteCount() const override { return 0; }; |
| 51 void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermode::Mode
) override { }; | 51 void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermode::Mode
) override { }; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 class MockWebMediaPlayer : public EmptyWebMediaPlayer { | 54 class MockWebMediaPlayer : public EmptyWebMediaPlayer { |
| 55 public: | 55 public: |
| 56 MOCK_METHOD1(setBufferingStrategy, void(BufferingStrategy)); | 56 MOCK_METHOD1(setBufferingStrategy, void(BufferingStrategy)); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 class StubFrameLoaderClient : public EmptyFrameLoaderClient { | 59 class StubFrameLoaderClient : public EmptyFrameLoaderClient { |
| 60 public: | 60 public: |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 } | 136 } |
| 137 ::testing::Mock::VerifyAndClearExpectations(player); | 137 ::testing::Mock::VerifyAndClearExpectations(player); |
| 138 | 138 |
| 139 // On play, the strategy is set to normal. | 139 // On play, the strategy is set to normal. |
| 140 EXPECT_CALL(*player, setBufferingStrategy(WebMediaPlayer::BufferingStrategy:
:Normal)); | 140 EXPECT_CALL(*player, setBufferingStrategy(WebMediaPlayer::BufferingStrategy:
:Normal)); |
| 141 m_video->play(); | 141 m_video->play(); |
| 142 ::testing::Mock::VerifyAndClearExpectations(player); | 142 ::testing::Mock::VerifyAndClearExpectations(player); |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace blink | 145 } // namespace blink |
| OLD | NEW |