Bug 1423241 - Remove drawImage exception handling from captureStream_common.js. r=jib

This can conceal real bugs. Tests should be fixed so they don't risk calling
getPixel in invalid states instead.

Differential Revision: https://phabricator.services.mozilla.com/D9100

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Pehrson 2018-11-23 15:01:07 +00:00
Родитель 4be83b9661
Коммит 6d2721e35a
2 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -128,12 +128,8 @@ CaptureStreamTestHelper.prototype = {
if (aborted) {
throw await cancel;
}
try {
if (test(this.getPixel(video, offsetX, offsetY, width, height))) {
return;
}
} catch (e) {
info("Waiting for pixel but no video available: " + e + "\n" + e.stack);
if (test(this.getPixel(video, offsetX, offsetY, width, height))) {
return;
}
}
},

Просмотреть файл

@ -24,10 +24,13 @@
video.play();
var h = new CaptureStreamTestHelper2D();
var removedTrack = stream.getVideoTracks()[0];
stream.removeTrack(removedTrack);
var removedTrack;
video.onloadeddata = () => {
info("loadeddata");
removedTrack = stream.getVideoTracks()[0];
stream.removeTrack(removedTrack);
var canvas = document.createElement("canvas");
canvas.getContext("2d");
var canvasStream = canvas.captureStream();