aboutsummaryrefslogtreecommitdiff
path: root/webrtc_lib_link_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webrtc_lib_link_test.cc')
-rw-r--r--webrtc_lib_link_test.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/webrtc_lib_link_test.cc b/webrtc_lib_link_test.cc
index 37e1b14eae..055bd969ff 100644
--- a/webrtc_lib_link_test.cc
+++ b/webrtc_lib_link_test.cc
@@ -65,9 +65,10 @@ void TestCase1ModularFactory() {
auto peer_connection_factory =
webrtc::CreateModularPeerConnectionFactory(std::move(pcf_deps));
webrtc::PeerConnectionInterface::RTCConfiguration rtc_config;
- auto peer_connection = peer_connection_factory->CreatePeerConnection(
- rtc_config, nullptr, nullptr, nullptr);
- printf("peer_connection=%s\n", peer_connection == nullptr ? "nullptr" : "ok");
+ auto result = peer_connection_factory->CreatePeerConnectionOrError(
+ rtc_config, PeerConnectionDependencies(nullptr));
+ // Creation will fail because of null observer, but that's OK.
+ printf("peer_connection creation=%s\n", result.ok() ? "succeeded" : "failed");
}
void TestCase2RegularFactory() {
@@ -81,9 +82,10 @@ void TestCase2RegularFactory() {
std::move(media_deps.video_encoder_factory),
std::move(media_deps.video_decoder_factory), nullptr, nullptr);
webrtc::PeerConnectionInterface::RTCConfiguration rtc_config;
- auto peer_connection = peer_connection_factory->CreatePeerConnection(
- rtc_config, nullptr, nullptr, nullptr);
- printf("peer_connection=%s\n", peer_connection == nullptr ? "nullptr" : "ok");
+ auto result = peer_connection_factory->CreatePeerConnectionOrError(
+ rtc_config, PeerConnectionDependencies(nullptr));
+ // Creation will fail because of null observer, but that's OK.
+ printf("peer_connection creation=%s\n", result.ok() ? "succeeded" : "failed");
}
} // namespace webrtc