OLD | NEW |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description("Tests the RTCPeerConnection constructor."); | 8 description("Tests the RTCPeerConnection constructor."); |
9 | 9 |
10 shouldNotThrow("new webkitRTCPeerConnection(null);"); | 10 shouldNotThrow("new webkitRTCPeerConnection(null);"); |
11 shouldNotThrow("new webkitRTCPeerConnection(null, null);"); | 11 shouldNotThrow("new webkitRTCPeerConnection(null, null);"); |
12 shouldNotThrow("new webkitRTCPeerConnection(undefined);"); | 12 shouldNotThrow("new webkitRTCPeerConnection(undefined);"); |
13 shouldNotThrow("new webkitRTCPeerConnection(undefined, undefined);"); | 13 shouldNotThrow("new webkitRTCPeerConnection(undefined, undefined);"); |
14 shouldThrow("new webkitRTCPeerConnection();"); | 14 shouldThrow("new webkitRTCPeerConnection();"); |
15 shouldThrow("new webkitRTCPeerConnection('');"); | 15 shouldThrow("new webkitRTCPeerConnection('');"); |
16 shouldThrow("new webkitRTCPeerConnection(null, '');"); | 16 shouldThrow("new webkitRTCPeerConnection(null, '');"); |
17 | 17 |
18 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[]}, null);"); | 18 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[]}, null);"); |
19 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, null);"); | 19 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, null);"); |
20 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', cr edential:'x'}]}, null);"); | 20 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', cr edential:'x'}]}, null);"); |
21 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', cr edential:'x'},{url:'stun:bar.com'}]}, null);"); | 21 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', cr edential:'x'},{url:'stun:bar.com'}]}, null);"); |
22 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]} , null);"); | 22 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]} , null);"); |
23 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:foo.com']}]}, null);"); | 23 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:foo.com']}]}, null);"); |
24 shouldNotThrow("new webkitRTCPeerConnection({fooServers:[], iceServers:[{urls:[' stun:foo.com', 'turn:foo.com']}]}, null);"); | |
pthatcher2
2015/09/16 04:09:58
Why bother having fooServers?
guoweis_left_chromium
2015/09/16 17:29:05
There are existing tests using "fooServers" which
| |
25 shouldNotThrow("new webkitRTCPeerConnection({iceServers:undefined}, null);"); | |
26 shouldNotThrow("new webkitRTCPeerConnection({}, null);"); | |
27 shouldThrow("new webkitRTCPeerConnection({iceServers:null}, null);"); | |
24 | 28 |
25 shouldThrow("new webkitRTCPeerConnection({fooServers:[]}, null);"); | 29 shouldNotThrow("new webkitRTCPeerConnection({fooServers:[]}, null);"); |
pthatcher2
2015/09/16 04:09:58
What does this test buy us over {}? In other word
guoweis_left_chromium
2015/09/16 17:29:05
Done.
| |
26 shouldThrow("new webkitRTCPeerConnection({iceServers:true}, null);"); | 30 shouldThrow("new webkitRTCPeerConnection({iceServers:true}, null);"); |
27 shouldThrow("new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null);"); | 31 shouldThrow("new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null);"); |
28 shouldThrow("new webkitRTCPeerConnection({iceServers:[{}]}, null);"); | 32 shouldThrow("new webkitRTCPeerConnection({iceServers:[{}]}, null);"); |
29 shouldThrow("new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null);"); | 33 shouldThrow("new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null);"); |
30 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:[1, 'turn:foo.com']} ]}, null);"); | 34 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:[1, 'turn:foo.com']} ]}, null);"); |
31 | 35 |
32 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none' }, null);"); | 36 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none' }, null);"); |
33 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay '}, null);"); | 37 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay '}, null);"); |
34 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'} , null);"); | 38 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'} , null);"); |
35 shouldThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo'}, n ull);"); | 39 shouldThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo'}, n ull);"); |
(...skipping 18 matching lines...) Expand all Loading... | |
54 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported _1:1, valid_and_supported_1:1}});"); | 58 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported _1:1, valid_and_supported_1:1}});"); |
55 shouldThrow("new webkitRTCPeerConnection(null, {optional:{valid_and_supported_1: 0}});"); | 59 shouldThrow("new webkitRTCPeerConnection(null, {optional:{valid_and_supported_1: 0}});"); |
56 shouldThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1 :0,valid_and_supported_2:0}]});"); | 60 shouldThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1 :0,valid_and_supported_2:0}]});"); |
57 shouldThrow("new webkitRTCPeerConnection(null, {optional:[{invalid:0}]});"); | 61 shouldThrow("new webkitRTCPeerConnection(null, {optional:[{invalid:0}]});"); |
58 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_1:1});"); | 62 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_1:1});"); |
59 shouldThrow("new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1});"); | 63 shouldThrow("new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1});"); |
60 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandato ry:{valid_and_supported_1:1}});"); | 64 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandato ry:{valid_and_supported_1:1}});"); |
61 </script> | 65 </script> |
62 </body> | 66 </body> |
63 </html> | 67 </html> |
OLD | NEW |