OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // This test generate synthetic data. For audio it's a sinusoid waveform with | 5 // This test generate synthetic data. For audio it's a sinusoid waveform with |
6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern | 6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern |
7 // that is shifting by one pixel per frame, each pixels neighbors right and down | 7 // that is shifting by one pixel per frame, each pixels neighbors right and down |
8 // is this pixels value +1, since the pixel value is 8 bit it will wrap | 8 // is this pixels value +1, since the pixel value is 8 bit it will wrap |
9 // frequently within the image. Visually this will create diagonally color bands | 9 // frequently within the image. Visually this will create diagonally color bands |
10 // that moves across the screen | 10 // that moves across the screen |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 audio_sender_config_.frequency, | 739 audio_sender_config_.frequency, |
740 base::Bind(&TestReceiverAudioCallback::CheckPcmAudioFrame, | 740 base::Bind(&TestReceiverAudioCallback::CheckPcmAudioFrame, |
741 test_receiver_audio_callback_)); | 741 test_receiver_audio_callback_)); |
742 } | 742 } |
743 } | 743 } |
744 RunTasks(2 * kFrameTimerMs + 1); // Empty the receiver pipeline. | 744 RunTasks(2 * kFrameTimerMs + 1); // Empty the receiver pipeline. |
745 EXPECT_EQ(i - 1, test_receiver_audio_callback_->number_times_called()); | 745 EXPECT_EQ(i - 1, test_receiver_audio_callback_->number_times_called()); |
746 } | 746 } |
747 | 747 |
748 // This tests start sending audio and video before the receiver is ready. | 748 // This tests start sending audio and video before the receiver is ready. |
749 // | 749 TEST_F(End2EndTest, StartSenderBeforeReceiver) { |
750 // TODO(miu): Test disabled because of non-determinism. | |
751 // http://crbug.com/314233 | |
752 TEST_F(End2EndTest, DISABLED_StartSenderBeforeReceiver) { | |
753 SetupConfig(transport::kOpus, kDefaultAudioSamplingRate, false, 1); | 750 SetupConfig(transport::kOpus, kDefaultAudioSamplingRate, false, 1); |
754 Create(); | 751 Create(); |
755 | 752 |
756 int video_start = kVideoStart; | 753 int video_start = kVideoStart; |
757 int audio_diff = kFrameTimerMs; | 754 int audio_diff = kFrameTimerMs; |
758 | 755 |
759 sender_to_receiver_.SetSendPackets(false); | 756 sender_to_receiver_.SetSendPackets(false); |
760 | 757 |
761 for (int i = 0; i < 3; ++i) { | 758 for (int i = 0; i < 3; ++i) { |
762 int num_10ms_blocks = audio_diff / 10; | 759 int num_10ms_blocks = audio_diff / 10; |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 EXPECT_EQ(total_event_count_for_frame, expected_event_count_for_frame); | 1281 EXPECT_EQ(total_event_count_for_frame, expected_event_count_for_frame); |
1285 } | 1282 } |
1286 | 1283 |
1287 // TODO(pwestin): Add repeatable packet loss test. | 1284 // TODO(pwestin): Add repeatable packet loss test. |
1288 // TODO(pwestin): Add test for misaligned send get calls. | 1285 // TODO(pwestin): Add test for misaligned send get calls. |
1289 // TODO(pwestin): Add more tests that does not resample. | 1286 // TODO(pwestin): Add more tests that does not resample. |
1290 // TODO(pwestin): Add test when we have starvation for our RunTask. | 1287 // TODO(pwestin): Add test when we have starvation for our RunTask. |
1291 | 1288 |
1292 } // namespace cast | 1289 } // namespace cast |
1293 } // namespace media | 1290 } // namespace media |
OLD | NEW |