Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <meta charset="utf-8"> | |
| 3 <title>RTCPeerConnectionIceEvent constructor</title> | |
| 4 <script src="../../resources/testharness.js"></script> | |
| 5 <script src="../../resources/testharnessreport.js"></script> | |
| 6 <script> | |
| 7 test(function() { | |
| 8 assert_equals(RTCPeerConnectionIceEvent.length, 1); | |
| 9 var e = new RTCPeerConnectionIceEvent('type'); | |
|
hbos_chromium
2016/11/14 15:45:14
What is 'type'? I don't get it from looking at the
foolip
2016/11/14 15:49:39
Yes, all event constructors have it has the first
lunalu1
2016/11/15 18:09:24
Done.
lunalu1
2016/11/15 18:09:24
Done.
| |
| 10 assert_equals(e.candidate, null); | |
| 11 assert_false(e.bubbles); | |
| 12 assert_false(e.cancelable); | |
| 13 }, 'RTCPeerConnectionIceEvent constructor with no candidate attribute provivded' ); | |
|
hbos_chromium
2016/11/14 15:45:15
nit: provided.'
lunalu1
2016/11/15 18:09:24
Done.
| |
| 14 | |
| 15 test(function() { | |
| 16 var e = new RTCPeerConnectionIceEvent('type', { candidate: null }); | |
| 17 assert_equals(e.candidate, null); | |
| 18 }, 'RTCPeerConnectionIceEvent constructor with cnadidate paased as "null".'); | |
|
hbos_chromium
2016/11/14 15:45:15
nit: candidate passed as null
lunalu1
2016/11/15 18:09:24
Done.
| |
| 19 | |
| 20 test(function() { | |
| 21 var e = new RTCPeerConnectionIceEvent('type', { candidate: undefined }); | |
| 22 assert_equals(e.candidate, null); | |
| 23 }, 'RTCPeerConnectionIceEvent constructor with candidate paased as "undefined".' ); | |
| 24 | |
| 25 test(function() { | |
| 26 var c = new RTCIceCandidate({ candidate: 'candidate', sdpMid: 'sdpMid', sdpMLi neIndex: 1 }); | |
| 27 var e = new RTCPeerConnectionIceEvent('type', { candidate: c, url: 'url', bubb les: true, cancelable: true}); | |
| 28 assert_equals(e.candidate, c); | |
| 29 assert_equals(e.url, undefined); | |
|
hbos_chromium
2016/11/14 15:45:14
nit: Add a TODO comment here since this assertion
lunalu1
2016/11/15 18:09:24
Done.
| |
| 30 assert_true(e.bubbles); | |
| 31 assert_true(e.cancelable); | |
| 32 }, 'RTCPeerConnectionIceEvent constructor with full arguments.'); | |
| 33 </script> | |
| OLD | NEW |