RTCPeerConnection-constructor.html (466B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>RTCPeerConnection constructor</title> 4 <script src=/resources/testharness.js></script> 5 <script src=/resources/testharnessreport.js></script> 6 <script> 7 test(() => { 8 const toStringThrows = { toString: function() { throw new Error; } }; 9 assert_throws_js(Error, () => new RTCPeerConnection({ peerIdentity: toStringThrows })); 10 }, "RTCPeerConnection constructor throws if the given peerIdentity getter throws"); 11 </script>