validated after WebIDL validation
    try {
      await pc.setRemoteDescription({ type: 'bogus', sdp: 'bogus' });
      t.unreached_func("Should have rejected.");
    } catch (e) {
      assert_throws_js(TypeError, () => { throw e });
    }
  }, 'setRemoteDescription with invalid type and invalid SDP should reject with TypeError');

  promise_test(async t => {
    const pc = new RTCPeerConnection();
    t.add_cleanup(() => pc.close());

    // SDP is validated after validating type
    try {
      await pc.