зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1514158 - Test that MediaRecorder.start() throws if MediaRecorder.stream is inactive. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D41587 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
bf71d848ad
Коммит
2c2903d85c
|
@ -82,11 +82,11 @@
|
|||
|
||||
assert_throws("NotSupportedError",
|
||||
function() {
|
||||
recorder =
|
||||
new MediaRecorder(stream, {mimeType : "video/invalid"});
|
||||
recorder = new MediaRecorder(
|
||||
new MediaStream(), {mimeType : "video/invalid"});
|
||||
},
|
||||
"recorder should throw() with unsupported mimeType");
|
||||
let recorder = new MediaRecorder(stream);
|
||||
let recorder = new MediaRecorder(new MediaStream());
|
||||
assert_equals(recorder.state, "inactive");
|
||||
|
||||
recorder.stop();
|
||||
|
@ -98,6 +98,14 @@
|
|||
assert_throws("InvalidStateError", function(){recorder.requestData()},
|
||||
"cannot requestData() if recorder is in |inactive| state");
|
||||
|
||||
assert_throws("NotSupportedError",
|
||||
function() {
|
||||
recorder.start();
|
||||
},
|
||||
"recorder should throw() when starting with inactive stream");
|
||||
|
||||
recorder.stream.addTrack(stream.getTracks()[0]);
|
||||
|
||||
drawSomethingOnCanvas();
|
||||
|
||||
recorder.onstop = recorderOnUnexpectedEvent;
|
||||
|
|
Загрузка…
Ссылка в новой задаче