Bug 1166832 - Fix ordering, draw both local red then test remotes to avoid ordering issues.
--- a/dom/media/tests/mochitest/test_peerConnection_multiple_captureStream_canvas_2d.html
+++ b/dom/media/tests/mochitest/test_peerConnection_multiple_captureStream_canvas_2d.html
@@ -71,27 +71,27 @@ runNetworkTest(() => {
},
function DRAW_LOCAL1_RED() {
// After requesting a frame it will be captured at the time of next render.
// Next render will happen at next stable state, at the earliest,
// i.e., this order of `requestFrame(); draw();` should work.
stream1.requestFrame();
h.drawColor(canvas1, h.red);
},
- function WAIT_FOR_REMOTE1_RED() {
- return h.waitForPixelColor(vremote1, h.red, 128,
- "pcRemote's remote1 should become red");
- },
function DRAW_LOCAL2_RED() {
// After requesting a frame it will be captured at the time of next render.
// Next render will happen at next stable state, at the earliest,
// i.e., this order of `requestFrame(); draw();` should work.
stream2.requestFrame();
h.drawColor(canvas2, h.red);
},
+ function WAIT_FOR_REMOTE1_RED() {
+ return h.waitForPixelColor(vremote1, h.red, 128,
+ "pcRemote's remote1 should become red");
+ },
function WAIT_FOR_REMOTE2_RED() {
return h.waitForPixelColor(vremote2, h.red, 128,
"pcRemote's remote2 should become red");
}
]);
test.run();
});
</script>