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

Unified Diff: webrtc/api/peerconnection_unittest.cc

Issue 2398963003: Move usage of QualityScaler to ViEEncoder. (Closed)
Patch Set: Fix flaky test Created 4 years, 1 month 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
Index: webrtc/api/peerconnection_unittest.cc
diff --git a/webrtc/api/peerconnection_unittest.cc b/webrtc/api/peerconnection_unittest.cc
index 3cfffe4631883f1997e4ca1bf26e4803f0f69b5b..ef097a2c5cbb637a12d495ef52f481a6cf8101d9 100644
--- a/webrtc/api/peerconnection_unittest.cc
+++ b/webrtc/api/peerconnection_unittest.cc
@@ -1465,7 +1465,13 @@ class P2PTestConductor : public testing::Test {
FakeConstraints setup_constraints;
setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp,
true);
- ASSERT_TRUE(CreateTestClients(&setup_constraints, &setup_constraints));
+ // Disable resolution adaptation, we don't want it interfering with the
+ // test results.
+ webrtc::PeerConnectionInterface::RTCConfiguration rtc_config;
+ rtc_config.set_cpu_adaptation(false);
+
+ ASSERT_TRUE(CreateTestClients(&setup_constraints, nullptr, &rtc_config,
+ &setup_constraints, nullptr, &rtc_config));
LocalP2PTest();
VerifyRenderedSize(640, 480);
}
@@ -1474,6 +1480,10 @@ class P2PTestConductor : public testing::Test {
FakeConstraints setup_constraints;
setup_constraints.AddMandatory(MediaConstraintsInterface::kEnableDtlsSrtp,
true);
+ // Disable resolution adaptation, we don't want it interfering with the
+ // test results.
+ webrtc::PeerConnectionInterface::RTCConfiguration rtc_config;
+ rtc_config.set_cpu_adaptation(false);
std::unique_ptr<FakeRTCCertificateGenerator> cert_generator(
rtc::SSLStreamAdapter::HaveDtlsSrtp() ?
@@ -1482,7 +1492,7 @@ class P2PTestConductor : public testing::Test {
// Make sure the new client is using a different certificate.
return PeerConnectionTestClient::CreateClientWithDtlsIdentityStore(
- "New Peer: ", &setup_constraints, nullptr, nullptr,
+ "New Peer: ", &setup_constraints, nullptr, &rtc_config,
std::move(cert_generator), prefer_constraint_apis_,
network_thread_.get(), worker_thread_.get());
}

Powered by Google App Engine
This is Rietveld 408576698