Bug 1298586: Wait for an additional frame. r?drno draft
authorByron Campen [:bwc] <docfaraday@gmail.com>
Thu, 08 Sep 2016 16:19:05 -0500
changeset 412290 d3773cb03bfdd1d2b884f581eee0cf19fa3d5006
parent 412289 644b3de5d7a18b101d44a003bc27d50853dee4c9
child 530928 53fdef6e22735c74d1d2d76829b7df3010569f1d
push id29111
push userbcampen@mozilla.com
push dateFri, 09 Sep 2016 18:14:30 +0000
reviewersdrno
bugs1298586
milestone51.0a1
Bug 1298586: Wait for an additional frame. r?drno MozReview-Commit-ID: JWY1nRICIBh
dom/media/tests/mochitest/test_peerConnection_simulcastOffer.html
--- a/dom/media/tests/mochitest/test_peerConnection_simulcastOffer.html
+++ b/dom/media/tests/mochitest/test_peerConnection_simulcastOffer.html
@@ -96,16 +96,23 @@
         function PC_REMOTE_WAIT_FOR_SECOND_MEDIA_FLOW(test) {
           return test.pcRemote.waitForMediaFlow();
         },
         function PC_REMOTE_WAIT_FOR_FRAMES_2() {
           var vremote = test.pcRemote.remoteMediaElements[0];
           ok(vremote, "Should have remote video element for pcRemote");
           return helper.waitForFrames(vremote);
         },
+        // For some reason, even though we're getting a 25x25 stream, sometimes
+        // the resolution isn't updated on the video element on the first frame.
+        function PC_REMOTE_WAIT_FOR_FRAMES_3() {
+          var vremote = test.pcRemote.remoteMediaElements[0];
+          ok(vremote, "Should have remote video element for pcRemote");
+          return helper.waitForFrames(vremote);
+        },
         function PC_REMOTE_CHECK_SIZE_2() {
           var vlocal = test.pcLocal.localMediaElements[0];
           var vremote = test.pcRemote.remoteMediaElements[0];
           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");