Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 2592693002: Make VideoSendStreamTest.DoesNotUtilizeUlpfecForH264WithNackEnabled useful again. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index e0f9962c6e5269a0c31c316011103050200b79fb..9bb189c14309c890f120e112203918e19dd8dd03 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -358,7 +358,7 @@ class UlpfecObserver : public test::EndToEndTest {
bool expect_ulpfec,
const std::string& codec,
VideoEncoder* encoder)
- : EndToEndTest(VideoSendStreamTest::kDefaultTimeoutMs),
+ : EndToEndTest(kTimeoutMs),
encoder_(encoder),
payload_name_(codec),
use_nack_(use_nack),
@@ -368,6 +368,10 @@ class UlpfecObserver : public test::EndToEndTest {
sent_ulpfec_(false),
header_extensions_enabled_(header_extensions_enabled) {}
+ // Some of the test cases are expected to time out and thus we are using
+ // a shorter timeout window than the default here.
+ static constexpr size_t kTimeoutMs = 10000;
+
private:
Action OnSendRtp(const uint8_t* packet, size_t length) override {
RTPHeader header;
@@ -421,9 +425,8 @@ class UlpfecObserver : public test::EndToEndTest {
}
}
- if (sent_media_) {
- if (sent_ulpfec_ || !expect_ulpfec_)
- observation_complete_.Set();
+ if (sent_media_ && sent_ulpfec_) {
+ observation_complete_.Set();
}
prev_header_ = header;
@@ -474,7 +477,8 @@ class UlpfecObserver : public test::EndToEndTest {
}
void PerformTest() override {
- EXPECT_TRUE(Wait()) << "Timed out waiting for ULPFEC and/or media packets.";
+ EXPECT_EQ(expect_ulpfec_, Wait())
+ << "Timed out waiting for ULPFEC and/or media packets.";
}
std::unique_ptr<internal::TransportAdapter> transport_adapter_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698