| OLD | NEW | 
|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <string> | 5 #include <string> | 
| 6 | 6 | 
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/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/mock_media_stream_dependency_factory.h" | 9 #include "content/renderer/media/mock_media_stream_dependency_factory.h" | 
| 10 #include "content/renderer/media/mock_media_stream_registry.h" | 10 #include "content/renderer/media/mock_media_stream_registry.h" | 
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 53  protected: | 53  protected: | 
| 54   PpFrameWriter writer_; | 54   PpFrameWriter writer_; | 
| 55   CaptureState last_capture_state_; | 55   CaptureState last_capture_state_; | 
| 56   int captured_frame_count_; | 56   int captured_frame_count_; | 
| 57   CapturedFrame* captured_frame_; | 57   CapturedFrame* captured_frame_; | 
| 58 }; | 58 }; | 
| 59 | 59 | 
| 60 class VideoDestinationHandlerTest : public ::testing::Test { | 60 class VideoDestinationHandlerTest : public ::testing::Test { | 
| 61  public: | 61  public: | 
| 62   VideoDestinationHandlerTest() : registry_(&factory_) { | 62   VideoDestinationHandlerTest() : registry_(&factory_) { | 
| 63     factory_.EnsurePeerConnectionFactory(); |  | 
| 64     registry_.Init(kTestStreamUrl); | 63     registry_.Init(kTestStreamUrl); | 
| 65   } | 64   } | 
| 66 | 65 | 
| 67  protected: | 66  protected: | 
| 68   MockMediaStreamDependencyFactory factory_; | 67   MockMediaStreamDependencyFactory factory_; | 
| 69   MockMediaStreamRegistry registry_; | 68   MockMediaStreamRegistry registry_; | 
| 70 }; | 69 }; | 
| 71 | 70 | 
| 72 TEST_F(PpFrameWriterTest, StartStop) { | 71 TEST_F(PpFrameWriterTest, StartStop) { | 
| 73   EXPECT_FALSE(writer_.IsRunning()); | 72   EXPECT_FALSE(writer_.IsRunning()); | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 118   webrtc::MediaStreamInterface* native_stream = extra_data->stream().get(); | 117   webrtc::MediaStreamInterface* native_stream = extra_data->stream().get(); | 
| 119   DCHECK(native_stream); | 118   DCHECK(native_stream); | 
| 120   webrtc::VideoTrackVector native_video_tracks = | 119   webrtc::VideoTrackVector native_video_tracks = | 
| 121       native_stream->GetVideoTracks(); | 120       native_stream->GetVideoTracks(); | 
| 122   EXPECT_EQ(1u, native_video_tracks.size()); | 121   EXPECT_EQ(1u, native_video_tracks.size()); | 
| 123 | 122 | 
| 124   delete frame_writer; | 123   delete frame_writer; | 
| 125 } | 124 } | 
| 126 | 125 | 
| 127 }  // namespace content | 126 }  // namespace content | 
| OLD | NEW | 
|---|