OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "content/renderer/media/media_stream_extra_data.h" | 8 #include "content/renderer/media/media_stream_extra_data.h" |
9 #include "content/renderer/media/media_stream_impl.h" | 9 #include "content/renderer/media/media_stream_impl.h" |
10 #include "content/renderer/media/mock_media_stream_dependency_factory.h" | 10 #include "content/renderer/media/mock_media_stream_dependency_factory.h" |
11 #include "content/renderer/media/mock_media_stream_dispatcher.h" | 11 #include "content/renderer/media/mock_media_stream_dispatcher.h" |
12 #include "content/renderer/media/video_capture_impl_manager.h" | 12 #include "content/renderer/media/video_capture_impl_manager.h" |
13 #include "media/base/video_decoder.h" | 13 #include "media/base/video_decoder.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amComponent.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamCompo
nent.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amDescriptor.h" | 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamDescr
iptor.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amSource.h" | 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamSourc
e.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" | 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 class MediaStreamImplUnderTest : public MediaStreamImpl { | 23 class MediaStreamImplUnderTest : public MediaStreamImpl { |
24 public: | 24 public: |
25 enum RequestState { | 25 enum RequestState { |
26 REQUEST_NOT_STARTED, | 26 REQUEST_NOT_STARTED, |
27 REQUEST_NOT_COMPLETE, | 27 REQUEST_NOT_COMPLETE, |
28 REQUEST_SUCCEEDED, | 28 REQUEST_SUCCEEDED, |
29 REQUEST_FAILED, | 29 REQUEST_FAILED, |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 true); | 235 true); |
236 EXPECT_EQ(0, ms_dispatcher_->stop_stream_counter()); | 236 EXPECT_EQ(0, ms_dispatcher_->stop_stream_counter()); |
237 EXPECT_EQ(1, ms_dispatcher_->request_stream_counter()); | 237 EXPECT_EQ(1, ms_dispatcher_->request_stream_counter()); |
238 ms_impl_->FrameWillClose(NULL); | 238 ms_impl_->FrameWillClose(NULL); |
239 EXPECT_EQ(1, ms_dispatcher_->stop_stream_counter()); | 239 EXPECT_EQ(1, ms_dispatcher_->stop_stream_counter()); |
240 ms_impl_->OnLocalMediaStreamStop(mixed_desc.label().utf8()); | 240 ms_impl_->OnLocalMediaStreamStop(mixed_desc.label().utf8()); |
241 EXPECT_EQ(1, ms_dispatcher_->stop_stream_counter()); | 241 EXPECT_EQ(1, ms_dispatcher_->stop_stream_counter()); |
242 } | 242 } |
243 | 243 |
244 } // namespace content | 244 } // namespace content |
OLD | NEW |