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 "base/memory/weak_ptr.h" | 5 #include "base/memory/weak_ptr.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
8 #include "content/renderer/media/html_video_element_capturer_source.h" | 8 #include "content/renderer/media/html_video_element_capturer_source.h" |
9 #include "media/base/limits.h" | 9 #include "media/base/limits.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 12 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
| 13 #include "third_party/WebKit/public/platform/WebString.h" |
13 | 14 |
14 using ::testing::_; | 15 using ::testing::_; |
15 using ::testing::InSequence; | 16 using ::testing::InSequence; |
16 using ::testing::Mock; | 17 using ::testing::Mock; |
17 using ::testing::SaveArg; | 18 using ::testing::SaveArg; |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 | 21 |
21 ACTION_P(RunClosure, closure) { | 22 ACTION_P(RunClosure, closure) { |
22 closure.Run(); | 23 closure.Run(); |
(...skipping 30 matching lines...) Expand all Loading... |
53 bool paused() const override { return false; } | 54 bool paused() const override { return false; } |
54 bool seeking() const override { return false; } | 55 bool seeking() const override { return false; } |
55 double duration() const override { return 0.0; } | 56 double duration() const override { return 0.0; } |
56 double currentTime() const override { return 0.0; } | 57 double currentTime() const override { return 0.0; } |
57 NetworkState getNetworkState() const override { | 58 NetworkState getNetworkState() const override { |
58 return NetworkStateEmpty; | 59 return NetworkStateEmpty; |
59 } | 60 } |
60 ReadyState getReadyState() const override { | 61 ReadyState getReadyState() const override { |
61 return ReadyStateHaveNothing; | 62 return ReadyStateHaveNothing; |
62 } | 63 } |
| 64 blink::WebString getErrorMessage() override { return blink::WebString(); } |
63 bool didLoadingProgress() override { return true; } | 65 bool didLoadingProgress() override { return true; } |
64 bool hasSingleSecurityOrigin() const override { return true; } | 66 bool hasSingleSecurityOrigin() const override { return true; } |
65 bool didPassCORSAccessCheck() const override { return true; } | 67 bool didPassCORSAccessCheck() const override { return true; } |
66 double mediaTimeForTimeValue(double timeValue) const override { return 0.0; } | 68 double mediaTimeForTimeValue(double timeValue) const override { return 0.0; } |
67 unsigned decodedFrameCount() const override { return 0; } | 69 unsigned decodedFrameCount() const override { return 0; } |
68 unsigned droppedFrameCount() const override { return 0; } | 70 unsigned droppedFrameCount() const override { return 0; } |
69 unsigned corruptedFrameCount() const override { return 0; } | 71 unsigned corruptedFrameCount() const override { return 0; } |
70 size_t audioDecodedByteCount() const override { return 0; } | 72 size_t audioDecodedByteCount() const override { return 0; } |
71 size_t videoDecodedByteCount() const override { return 0; } | 73 size_t videoDecodedByteCount() const override { return 0; } |
72 | 74 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 base::Bind(&HTMLVideoElementCapturerSourceTest::OnRunning, | 162 base::Bind(&HTMLVideoElementCapturerSourceTest::OnRunning, |
161 base::Unretained(this))); | 163 base::Unretained(this))); |
162 | 164 |
163 run_loop.Run(); | 165 run_loop.Run(); |
164 | 166 |
165 html_video_capturer_->StopCapture(); | 167 html_video_capturer_->StopCapture(); |
166 Mock::VerifyAndClearExpectations(this); | 168 Mock::VerifyAndClearExpectations(this); |
167 } | 169 } |
168 | 170 |
169 } // namespace content | 171 } // namespace content |
OLD | NEW |