| <title>Testing createOffer/createAnswer</title> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| var pc1 = new RTCPeerConnection(); |
| pc1.addTransceiver("video"); |
| return pc1.createOffer().then((offer) => { |
| assert_false(offer instanceof RTCSessionDescription); |
| }, "Ensuring that offer is a RTCSessionDescriptionInit"); |
| var pc2 = new RTCPeerConnection(); |
| pc2.addTransceiver("video"); |
| return pc2.setRemoteDescription(pc1Offer).then(() => { |
| return pc2.createAnswer(); |
| assert_false(pc1Offer instanceof RTCSessionDescription); |
| }, "Ensuring that answer is a RTCSessionDescriptionInit"); |