зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1208328 - Test MediaStreamTrackEvent like RTCTrackEvent. r=smaug
MozReview-Commit-ID: GAEu2FskUJr --HG-- extra : rebase_source : ec18520447f4e9a554e0ab35a057d1248063d86e extra : source : ece1345d0b6558ff5358f906aad56f0f32648bcd
This commit is contained in:
Родитель
b6566cadf0
Коммит
5bc6c4811d
|
@ -303,9 +303,8 @@ const kEventConstructors = {
|
|||
return new MediaStreamEvent(aName, aProps);
|
||||
},
|
||||
},
|
||||
MediaStreamTrackEvent: { create: function (aName, aProps) {
|
||||
return new MediaStreamTrackEvent(aName, aProps);
|
||||
},
|
||||
MediaStreamTrackEvent: {
|
||||
// Difficult to test required arguments.
|
||||
},
|
||||
MessageEvent: { create: function (aName, aProps) {
|
||||
var e = new MessageEvent("messageevent", { bubbles: aProps.bubbles,
|
||||
|
|
|
@ -97,6 +97,11 @@ runTest(() => getUserMedia({audio: true, video: true})
|
|||
stream.getTracks().forEach(t => removeTrack(t));
|
||||
|
||||
return spinEventLoop();
|
||||
})
|
||||
.then(() => {
|
||||
// Test MediaStreamTrackEvent required args here.
|
||||
mustThrowWith("MediaStreamTrackEvent without required args",
|
||||
"TypeError", () => new MediaStreamTrackEvent("addtrack", {}));
|
||||
}));
|
||||
</script>
|
||||
</pre>
|
||||
|
|
Загрузка…
Ссылка в новой задаче