gecko-dev/testing/web-platform/tests/webrtc-identity/RTCPeerConnection-constructor.html
youennf 896e287102 Bug 1504496 [wpt PR 13892] - Move peerIdentity test from webrtc-pc to webrtc-identity, a=testonly
Automatic update from web-platform-testsMove peerIdentity test from webrtc-pc to webrtc-identity (#13892)

Move peerIdentity test from webrtc-pc to webrtc-identity
--

wpt-commits: 0ec83a2998156414399e365a4fbe9be7402b0285
wpt-pr: 13892
2018-11-14 13:37:32 +00:00

11 lines
467 B
HTML

<!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(new Error, () => new RTCPeerConnection({ peerIdentity: toStringThrows }));
}, "RTCPeerConnection constructor throws if the given peerIdentity getter throws");
</script>