Bug 1249860 - Add simulcast test for resolution scaling. r=bwc

MozReview-Commit-ID: LU7gUD0ycKw
This commit is contained in:
Jan-Ivar Bruaroey 2016-02-20 01:35:24 -05:00
parent c1eb21b4f1
commit d37efdb75a

View File

@ -83,7 +83,7 @@
sender.setParameters({
encodings: [
{ rid: "foo", maxBitrate: 40000 },
{ rid: "bar", maxBitrate: 40000 },
{ rid: "bar", maxBitrate: 40000, scaleResolutionDownBy: 2 },
]
});
}
@ -113,6 +113,16 @@
ok(vremote, "Should have remote video element for pcRemote");
return waitForColorChange(helper, vremote);
},
function PC_REMOTE_CHECK_SIZE_1() {
var vlocal = document.getElementById('pcLocal_local1_video');
var vremote = document.getElementById('pcRemote_remote1_video');
ok(vlocal, "Should have local video element for pcLocal");
ok(vremote, "Should have remote video element for pcRemote");
ok(vlocal.videoWidth > 0, "source width is positive");
ok(vlocal.videoHeight > 0, "source height is positive");
is(vremote.videoWidth, vlocal.videoWidth, "sink is same width as source");
is(vremote.videoHeight, vlocal.videoHeight, "sink is same height as source");
},
function PC_REMOTE_SET_RTP_SECOND_RID(test) {
// Now, cause pcRemote to filter out everything but the second SSRC.
// This lets only the other simulcast stream through.
@ -126,6 +136,16 @@
ok(vremote, "Should have remote video element for pcRemote");
return waitForColorChange(helper, vremote);
},
function PC_REMOTE_CHECK_SIZE_2() {
var vlocal = document.getElementById('pcLocal_local1_video');
var vremote = document.getElementById('pcRemote_remote1_video');
ok(vlocal, "Should have local video element for pcLocal");
ok(vremote, "Should have remote video element for pcRemote");
ok(vlocal.videoWidth > 0, "source width is positive");
ok(vlocal.videoHeight > 0, "source height is positive");
is(vremote.videoWidth, vlocal.videoWidth / 2, "sink is 1/2 width of source");
is(vremote.videoHeight, vlocal.videoHeight / 2, "sink is 1/2 height of source");
},
function PC_REMOTE_SET_RTP_NONEXISTENT_RID(test) {
// Now, cause pcRemote to filter out everything, just to make sure
// selectRecvSsrc is working.