summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webrtc-identity/RTCPeerConnection-constructor.html
blob: e7b7016338d8b8865b95098a0ec6f7eb2b65c4fb (plain)
1
2
3
4
5
6
7
8
9
10
11
<!doctype html>
<meta charset=utf-8>
<title>RTCPeerConnection constructor</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
test(() => {
    const toStringThrows = { toString: function() { throw new Error; } };
    assert_throws_js(Error, () => new RTCPeerConnection({ peerIdentity: toStringThrows }));
}, "RTCPeerConnection constructor throws if the given peerIdentity getter throws");
</script>