OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>RTCPeerConnection signalingState</title> | 4 <title>RTCPeerConnection signalingState</title> |
5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <script> | 9 <script> |
10 | 10 |
11 async_test(function(test) { | 11 async_test(function(test) { |
12 var pc = new webkitRTCPeerConnection({iceServers: []}, null); | 12 var pc = new RTCPeerConnection(); |
13 assert_equals(pc.signalingState, 'stable'); | 13 assert_equals(pc.signalingState, 'stable'); |
14 pc.onsignalingstatechange = test.step_func(() => { | 14 pc.onsignalingstatechange = test.step_func(() => { |
15 assert_equals(pc.signalingState, 'closed'); | 15 assert_equals(pc.signalingState, 'closed'); |
16 test.done(); | 16 test.done(); |
17 }); | 17 }); |
18 pc.close(); | 18 pc.close(); |
19 }, 'Tests the RTCPeerConnection "stable" and "closed" signalingState strings.'); | 19 }, 'Tests the RTCPeerConnection "stable" and "closed" signalingState strings.'); |
20 | 20 |
21 </script> | 21 </script> |
22 </body> | 22 </body> |
23 </html> | 23 </html> |
OLD | NEW |