OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 factory_->CreateVideoSource(capturer, NULL)); | 353 factory_->CreateVideoSource(capturer, NULL)); |
354 ASSERT_TRUE(source.get() != NULL); | 354 ASSERT_TRUE(source.get() != NULL); |
355 rtc::scoped_refptr<VideoTrackInterface> track( | 355 rtc::scoped_refptr<VideoTrackInterface> track( |
356 factory_->CreateVideoTrack("testlabel", source)); | 356 factory_->CreateVideoTrack("testlabel", source)); |
357 ASSERT_TRUE(track.get() != NULL); | 357 ASSERT_TRUE(track.get() != NULL); |
358 FakeVideoTrackRenderer local_renderer(track); | 358 FakeVideoTrackRenderer local_renderer(track); |
359 | 359 |
360 EXPECT_EQ(0, local_renderer.num_rendered_frames()); | 360 EXPECT_EQ(0, local_renderer.num_rendered_frames()); |
361 EXPECT_TRUE(capturer->CaptureFrame()); | 361 EXPECT_TRUE(capturer->CaptureFrame()); |
362 EXPECT_EQ(1, local_renderer.num_rendered_frames()); | 362 EXPECT_EQ(1, local_renderer.num_rendered_frames()); |
| 363 EXPECT_FALSE(local_renderer.black_frame()); |
363 | 364 |
364 track->set_enabled(false); | 365 track->set_enabled(false); |
365 EXPECT_TRUE(capturer->CaptureFrame()); | 366 EXPECT_TRUE(capturer->CaptureFrame()); |
366 EXPECT_EQ(1, local_renderer.num_rendered_frames()); | 367 EXPECT_EQ(2, local_renderer.num_rendered_frames()); |
| 368 EXPECT_TRUE(local_renderer.black_frame()); |
367 | 369 |
368 track->set_enabled(true); | 370 track->set_enabled(true); |
369 EXPECT_TRUE(capturer->CaptureFrame()); | 371 EXPECT_TRUE(capturer->CaptureFrame()); |
370 EXPECT_EQ(2, local_renderer.num_rendered_frames()); | 372 EXPECT_EQ(3, local_renderer.num_rendered_frames()); |
| 373 EXPECT_FALSE(local_renderer.black_frame()); |
371 } | 374 } |
372 | |
OLD | NEW |