зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1208328 - Test MediaStreamTrackEvent like RTCTrackEvent. r=smaug
MozReview-Commit-ID: GAEu2FskUJr --HG-- extra : rebase_source : 3f31d212470e67bfb1e336d6215a301b2ca18a8c extra : intermediate-source : 3160ce8f87590a3a611267595cb478479dfdb2f3 extra : source : ece1345d0b6558ff5358f906aad56f0f32648bcd
This commit is contained in:
Родитель
e1e731a6c0
Коммит
cdb03c0dcd
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче