Update device orientation & motion permission native SPI as per latest proposal
[WebKit-https.git] / LayoutTests / webrtc / legacy-api.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3     <head>
4         <script src="../resources/testharness.js"></script>
5     </head>
6     <body>
7         <script>
8 promise_test(function() {
9     var pc1 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
10     var pc2 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
11     assert_equals(pc1.getLocalStreams, undefined);
12     assert_equals(pc1.getRemoteStreams, undefined);
13     assert_equals(pc1.getStreamById, undefined);
14     assert_equals(pc1.addStream, undefined);
15     assert_equals(pc1.removeStream, undefined);
16     assert_equals(pc1.onaddstream, undefined);
17
18     var channel = pc1.createDataChannel("test");
19     return pc1.createOffer({ }, assert_unreached, assert_unreached).then((offer) => {
20         return pc1.setLocalDescription(offer, assert_unreached, assert_unreached).then(() => { return offer; }); 
21     }).then((offer) => {
22         return pc2.setRemoteDescription(offer, assert_unreached, assert_unreached); 
23     }).then(() => {
24         return pc2.createAnswer({ }, assert_unreached, assert_unreached);
25     });
26 }, "Testing legacy API is not defined");
27         </script>
28         <script src="../resources/testharnessreport.js"></script>
29     </body>
30 </html>