Commit 74aff959 authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

Reenable simulcast test for Linux

This test would hang if anything ever went wrong, because
failures were not being checked.

Rewrote the test to always use failure callbacks.
Also switched to using rtcp-mux.

Tested by 120 runs on workstation.

Bug: chromium:452623
Change-Id: Ie73c32edf22b4ca40e9f5e01b9e9fe5cc054623f
Reviewed-on: https://chromium-review.googlesource.com/967761
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Commit-Queue: Tommi <tommi@chromium.org>
Reviewed-by: default avatarTommi <tommi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543936}
parent 90fd0807
...@@ -46,7 +46,7 @@ class WebRtcSimulcastBrowserTest : public WebRtcTestBase { ...@@ -46,7 +46,7 @@ class WebRtcSimulcastBrowserTest : public WebRtcTestBase {
// Fails/times out on Windows and Chrome OS. Flaky on Linux. // Fails/times out on Windows and Chrome OS. Flaky on Linux.
// http://crbug.com/452623 // http://crbug.com/452623
// MSan reports errors. http://crbug.com/452892 // MSan reports errors. http://crbug.com/452892
#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(MEMORY_SANITIZER) #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(MEMORY_SANITIZER)
#define MAYBE_TestVgaReturnsTwoSimulcastStreams DISABLED_TestVgaReturnsTwoSimulcastStreams #define MAYBE_TestVgaReturnsTwoSimulcastStreams DISABLED_TestVgaReturnsTwoSimulcastStreams
#else #else
#define MAYBE_TestVgaReturnsTwoSimulcastStreams TestVgaReturnsTwoSimulcastStreams #define MAYBE_TestVgaReturnsTwoSimulcastStreams TestVgaReturnsTwoSimulcastStreams
......
...@@ -57,7 +57,7 @@ function makeClientOffer() { ...@@ -57,7 +57,7 @@ function makeClientOffer() {
's=-', 's=-',
't=0 0', 't=0 0',
'm=video 1 RTP/SAVPF 100', 'm=video 1 RTP/SAVPF 100',
'a=rtcp:1 IN IP4 0.0.0.0', 'a=rtcp-mux',
'a=ice-ufrag:6HHHdzzeIhkE0CKj', 'a=ice-ufrag:6HHHdzzeIhkE0CKj',
'a=ice-pwd:XYDGVpfvklQIEnZ6YnyLsAew', 'a=ice-pwd:XYDGVpfvklQIEnZ6YnyLsAew',
'a=sendonly', 'a=sendonly',
...@@ -107,7 +107,7 @@ var PC_SERVER_REMOTE_OFFER = [ ...@@ -107,7 +107,7 @@ var PC_SERVER_REMOTE_OFFER = [
'm=video 1 RTP/SAVPF 100', 'm=video 1 RTP/SAVPF 100',
'a=sendonly', 'a=sendonly',
'a=mid:video', 'a=mid:video',
'a=rtcp:1 IN IP4 0.0.0.0', 'a=rtcp-mux',
'a=ice-ufrag:6HHHdzzeIhkE0CKj', 'a=ice-ufrag:6HHHdzzeIhkE0CKj',
'a=ice-pwd:XYDGVpfvklQIEnZ6YnyLsAew', 'a=ice-pwd:XYDGVpfvklQIEnZ6YnyLsAew',
'a=crypto:1 AES_CM_128_HMAC_SHA1_80 ' + 'a=crypto:1 AES_CM_128_HMAC_SHA1_80 ' +
...@@ -133,9 +133,14 @@ function trace(text) { ...@@ -133,9 +133,14 @@ function trace(text) {
console.log((performance.now() / 1000).toFixed(3) + ': ' + text); console.log((performance.now() / 1000).toFixed(3) + ': ' + text);
} }
function fail(e) {
trace('Failure : ' + e.name + ': ' + e.message);
throw e;
}
function initialize() { function initialize() {
trace('Setting up for a new call.'); trace('Setting up for a new call.');
var configs = {iceServers:[], rtcpMuxPolicy:'negotiate'}; var configs = {iceServers:[]};
var constraints = {'mandatory': {'DtlsSrtpKeyAgreement': false}}; var constraints = {'mandatory': {'DtlsSrtpKeyAgreement': false}};
pcClient = new RTCPeerConnection(configs, constraints); pcClient = new RTCPeerConnection(configs, constraints);
trace('Created local peer connection object pcClient'); trace('Created local peer connection object pcClient');
...@@ -146,9 +151,9 @@ function initialize() { ...@@ -146,9 +151,9 @@ function initialize() {
pcServer.onaddstream = onServerGotStream; pcServer.onaddstream = onServerGotStream;
var pcClientInitialOffer = makeClientOffer(); var pcClientInitialOffer = makeClientOffer();
trace('Setting initial local Offer to:\n' + pcClientInitialOffer); trace('Setting initial local Offer to:\n' + pcClientInitialOffer.sdp);
pcClient.setLocalDescription(pcClientInitialOffer, pcClient.setLocalDescription(pcClientInitialOffer,
setServerRemoteDescription); setServerRemoteDescription, fail);
} }
function gotStream(stream) { function gotStream(stream) {
...@@ -178,8 +183,8 @@ function openCamera(width, height) { ...@@ -178,8 +183,8 @@ function openCamera(width, height) {
function renegotiateClient() { function renegotiateClient() {
pcClient.setLocalDescription(makeClientOffer(), function() { pcClient.setLocalDescription(makeClientOffer(), function() {
pcClient.setRemoteDescription(serverAnswer); pcClient.setRemoteDescription(serverAnswer, function(){}, fail);
}); }, fail);
} }
function setServerRemoteDescription() { function setServerRemoteDescription() {
...@@ -187,19 +192,19 @@ function setServerRemoteDescription() { ...@@ -187,19 +192,19 @@ function setServerRemoteDescription() {
pcServer.setRemoteDescription(new RTCSessionDescription({ pcServer.setRemoteDescription(new RTCSessionDescription({
'type': 'offer', 'type': 'offer',
'sdp': PC_SERVER_REMOTE_OFFER 'sdp': PC_SERVER_REMOTE_OFFER
}), afterSetServerRemoteDescription); }), afterSetServerRemoteDescription, fail);
} }
function afterSetServerRemoteDescription() { function afterSetServerRemoteDescription() {
pcServer.createAnswer(onServerAnswer, function(error) {}); pcServer.createAnswer(onServerAnswer, fail);
} }
function onServerAnswer(desc) { function onServerAnswer(desc) {
desc.sdp += 'a=x-google-flag:conference\n'; desc.sdp += 'a=x-google-flag:conference\n';
serverAnswer = desc; serverAnswer = desc;
trace('Setting both Answers to:\n' + desc.sdp); trace('Setting both Answers to:\n' + desc.sdp);
pcServer.setLocalDescription(desc); pcServer.setLocalDescription(desc, function() {}, fail);
pcClient.setRemoteDescription(desc); pcClient.setRemoteDescription(desc, function() {}, fail);
} }
function onServerGotStream(e) { function onServerGotStream(e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment