| 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);"); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 shouldNotThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_and_supporte
d_1:1, valid_and_supported_2:1}});"); | 45 shouldNotThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_and_supporte
d_1:1, valid_and_supported_2:1}});"); |
| 46 shouldNotThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supporte
d_1:0}]});"); | 46 shouldNotThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supporte
d_1:0}]});"); |
| 47 shouldNotThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supporte
d_1:0},{valid_and_supported_2:0}]});"); | 47 shouldNotThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supporte
d_1:0},{valid_and_supported_2:0}]});"); |
| 48 shouldNotThrow("new webkitRTCPeerConnection(null, {optional:[{valid_but_unsuppor
ted_1:0},{valid_but_unsupported_2:0}]});"); | 48 shouldNotThrow("new webkitRTCPeerConnection(null, {optional:[{valid_but_unsuppor
ted_1:0},{valid_but_unsupported_2:0}]});"); |
| 49 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1
:66}});"); | 49 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1
:66}});"); |
| 50 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{invalid:1}});"); | 50 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{invalid:1}});"); |
| 51 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported
_1:1}});"); | 51 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported
_1:1}});"); |
| 52 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported
_1:1, valid_and_supported_1:1}});"); | 52 shouldThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported
_1:1, valid_and_supported_1:1}});"); |
| 53 shouldThrow("new webkitRTCPeerConnection(null, {optional:{valid_and_supported_1:
0}});"); | 53 shouldThrow("new webkitRTCPeerConnection(null, {optional:{valid_and_supported_1:
0}});"); |
| 54 shouldThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1
:0,valid_and_supported_2:0}]});"); | 54 shouldThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1
:0,valid_and_supported_2:0}]});"); |
| 55 shouldThrow("new webkitRTCPeerConnection(null, {optional:[{invalid:0}]});"); | 55 // Optional constraints are ignored even if they are invalid. |
| 56 shouldNotThrow("new webkitRTCPeerConnection(null, {optional:[{invalid:0}]});"); |
| 56 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_1:1});"); | 57 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_1:1});"); |
| 57 shouldThrow("new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1});"); | 58 shouldThrow("new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1});"); |
| 58 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandato
ry:{valid_and_supported_1:1}});"); | 59 shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandato
ry:{valid_and_supported_1:1}});"); |
| 59 | 60 |
| 60 // Construct with certificates. | 61 // Construct with certificates. |
| 61 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:null});
"); | 62 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:null});
"); |
| 62 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[]});")
; | 63 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[]});")
; |
| 63 shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[null]});"
); | 64 shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[null]});"
); |
| 64 shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[1337]});"
); | 65 shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[1337]});"
); |
| 65 // Global certificate variables so that the "should..." methods can evaluate the
m. | 66 // Global certificate variables so that the "should..." methods can evaluate the
m. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 94 } | 95 } |
| 95 // Sequentially test construction with RSA and ECDSA certificates. | 96 // Sequentially test construction with RSA and ECDSA certificates. |
| 96 // testCertificates2ECDSA's callback methods mark the end of the async tests. | 97 // testCertificates2ECDSA's callback methods mark the end of the async tests. |
| 97 testCertificates1RSA(); | 98 testCertificates1RSA(); |
| 98 | 99 |
| 99 window.jsTestIsAsync = true; | 100 window.jsTestIsAsync = true; |
| 100 window.successfullyParsed = true; | 101 window.successfullyParsed = true; |
| 101 </script> | 102 </script> |
| 102 </body> | 103 </body> |
| 103 </html> | 104 </html> |
| OLD | NEW |