| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2249 } | 2249 } |
| 2250 | 2250 |
| 2251 TEST_F(VideoChannelTest, TestSetRemoteContentUpdate) { | 2251 TEST_F(VideoChannelTest, TestSetRemoteContentUpdate) { |
| 2252 Base::TestSetRemoteContentUpdate(); | 2252 Base::TestSetRemoteContentUpdate(); |
| 2253 } | 2253 } |
| 2254 | 2254 |
| 2255 TEST_F(VideoChannelTest, TestStreams) { | 2255 TEST_F(VideoChannelTest, TestStreams) { |
| 2256 Base::TestStreams(); | 2256 Base::TestStreams(); |
| 2257 } | 2257 } |
| 2258 | 2258 |
| 2259 TEST_F(VideoChannelTest, TestScreencastEvents) { | |
| 2260 const int kTimeoutMs = 500; | |
| 2261 TestInit(); | |
| 2262 cricket::ScreencastEventCatcher catcher; | |
| 2263 channel1_->SignalScreencastWindowEvent.connect( | |
| 2264 &catcher, | |
| 2265 &cricket::ScreencastEventCatcher::OnEvent); | |
| 2266 | |
| 2267 rtc::scoped_ptr<cricket::FakeScreenCapturerFactory> | |
| 2268 screen_capturer_factory(new cricket::FakeScreenCapturerFactory()); | |
| 2269 cricket::VideoCapturer* screen_capturer = screen_capturer_factory->Create( | |
| 2270 ScreencastId(WindowId(0))); | |
| 2271 ASSERT_TRUE(screen_capturer != NULL); | |
| 2272 | |
| 2273 EXPECT_TRUE(channel1_->AddScreencast(0, screen_capturer)); | |
| 2274 EXPECT_EQ_WAIT(cricket::CS_STOPPED, screen_capturer_factory->capture_state(), | |
| 2275 kTimeoutMs); | |
| 2276 | |
| 2277 screen_capturer->SignalStateChange(screen_capturer, cricket::CS_PAUSED); | |
| 2278 EXPECT_EQ_WAIT(rtc::WE_MINIMIZE, catcher.event(), kTimeoutMs); | |
| 2279 | |
| 2280 screen_capturer->SignalStateChange(screen_capturer, cricket::CS_RUNNING); | |
| 2281 EXPECT_EQ_WAIT(rtc::WE_RESTORE, catcher.event(), kTimeoutMs); | |
| 2282 | |
| 2283 screen_capturer->SignalStateChange(screen_capturer, cricket::CS_STOPPED); | |
| 2284 EXPECT_EQ_WAIT(rtc::WE_CLOSE, catcher.event(), kTimeoutMs); | |
| 2285 | |
| 2286 EXPECT_TRUE(channel1_->RemoveScreencast(0)); | |
| 2287 } | |
| 2288 | |
| 2289 TEST_F(VideoChannelTest, TestUpdateStreamsInLocalContent) { | 2259 TEST_F(VideoChannelTest, TestUpdateStreamsInLocalContent) { |
| 2290 Base::TestUpdateStreamsInLocalContent(); | 2260 Base::TestUpdateStreamsInLocalContent(); |
| 2291 } | 2261 } |
| 2292 | 2262 |
| 2293 TEST_F(VideoChannelTest, TestUpdateRemoteStreamsInContent) { | 2263 TEST_F(VideoChannelTest, TestUpdateRemoteStreamsInContent) { |
| 2294 Base::TestUpdateStreamsInRemoteContent(); | 2264 Base::TestUpdateStreamsInRemoteContent(); |
| 2295 } | 2265 } |
| 2296 | 2266 |
| 2297 TEST_F(VideoChannelTest, TestChangeStreamParamsInContent) { | 2267 TEST_F(VideoChannelTest, TestChangeStreamParamsInContent) { |
| 2298 Base::TestChangeStreamParamsInContent(); | 2268 Base::TestChangeStreamParamsInContent(); |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2690 }; | 2660 }; |
| 2691 rtc::Buffer payload(data, 3); | 2661 rtc::Buffer payload(data, 3); |
| 2692 cricket::SendDataResult result; | 2662 cricket::SendDataResult result; |
| 2693 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 2663 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
| 2694 EXPECT_EQ(params.ssrc, | 2664 EXPECT_EQ(params.ssrc, |
| 2695 media_channel1_->last_sent_data_params().ssrc); | 2665 media_channel1_->last_sent_data_params().ssrc); |
| 2696 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 2666 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
| 2697 } | 2667 } |
| 2698 | 2668 |
| 2699 // TODO(pthatcher): TestSetReceiver? | 2669 // TODO(pthatcher): TestSetReceiver? |
| OLD | NEW |