OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <meta charset="utf-8"> | |
3 <title>RTCDataChannelEvent constructor</title> | |
4 <script src="../../resources/testharness.js"></script> | |
5 <script src="../../resources/testharnessreport.js"></script> | |
6 <script> | |
7 test(function() { | |
8 assert_equals(RTCDataChannelEvent.length, 2); | |
9 assert_throws(new TypeError(), function() { new RTCDataChannelEvent('type'); }); | |
foolip
2016/11/08 20:36:43
Here, can you also test that these two throw TypeE
lunalu1
2016/11/11 15:37:27
Done.
| |
10 }, 'Checks for RTCDataChannelEvent constructor without a required argument.'); | |
11 | |
12 test(function() { | |
13 var pc = new RTCPeerConnection(); | |
14 var c = pc.createDataChannel(''); | |
15 var e = new RTCDataChannelEvent('type', {channel: c}); | |
16 assert_true(e instanceof RTCDataChannelEvent); | |
17 assert_equals(e.channel, c); | |
18 }, 'Checks for RTCDataChannelEvent constructor with full arguments.'); | |
19 </script> | |
OLD | NEW |