зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
4be83b9661
Коммит
6d2721e35a
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче