| 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 RTCDataChannel."); | 8 description("Tests RTCDataChannel."); |
| 9 | 9 |
| 10 var pc = null; | 10 var pc = null; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 function pc_onicechange() { | 82 function pc_onicechange() { |
| 83 if (pc.iceConnectionState === "completed") { | 83 if (pc.iceConnectionState === "completed") { |
| 84 testPassed("pc is connected"); | 84 testPassed("pc is connected"); |
| 85 shouldNotThrow('dc = pc.createDataChannel("label");'); | 85 shouldNotThrow('dc = pc.createDataChannel("label");'); |
| 86 shouldBe("dc.readyState", "'connecting'"); | 86 shouldBe("dc.readyState", "'connecting'"); |
| 87 dc.onopen = dc_onopen; | 87 dc.onopen = dc_onopen; |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 pc = new webkitRTCPeerConnection(null, null); | 91 pc = new RTCPeerConnection(); |
| 92 shouldNotThrow('dc = pc.createDataChannel("label1");'); | 92 shouldNotThrow('dc = pc.createDataChannel("label1");'); |
| 93 shouldBe("dc.reliable", "true"); | 93 shouldBe("dc.reliable", "true"); |
| 94 shouldNotThrow('dc = pc.createDataChannel("label2", {});'); | 94 shouldNotThrow('dc = pc.createDataChannel("label2", {});'); |
| 95 shouldBe("dc.reliable", "true"); | 95 shouldBe("dc.reliable", "true"); |
| 96 shouldNotThrow('dc = pc.createDataChannel("label3", {ordered:true});'); | 96 shouldNotThrow('dc = pc.createDataChannel("label3", {ordered:true});'); |
| 97 shouldBe("dc.reliable", "true"); | 97 shouldBe("dc.reliable", "true"); |
| 98 shouldNotThrow('dc = pc.createDataChannel("label3", {ordered:false});'); | 98 shouldNotThrow('dc = pc.createDataChannel("label3", {ordered:false});'); |
| 99 shouldBe("dc.reliable", "false"); | 99 shouldBe("dc.reliable", "false"); |
| 100 shouldNotThrow('dc = pc.createDataChannel("label3", {maxRetransmits:0});'); | 100 shouldNotThrow('dc = pc.createDataChannel("label3", {maxRetransmits:0});'); |
| 101 shouldBe("dc.reliable", "false"); | 101 shouldBe("dc.reliable", "false"); |
| 102 shouldNotThrow('dc = pc.createDataChannel("label3", {maxRetransmitTime:0});'); | 102 shouldNotThrow('dc = pc.createDataChannel("label3", {maxRetransmitTime:0});'); |
| 103 shouldBe("dc.reliable", "false"); | 103 shouldBe("dc.reliable", "false"); |
| 104 | 104 |
| 105 pc = new webkitRTCPeerConnection(null, null); | 105 pc = new RTCPeerConnection(); |
| 106 pc.oniceconnectionstatechange = pc_onicechange; | 106 pc.oniceconnectionstatechange = pc_onicechange; |
| 107 pc.ondatachannel = pc_ondatachannel; | 107 pc.ondatachannel = pc_ondatachannel; |
| 108 | 108 |
| 109 window.jsTestIsAsync = true; | 109 window.jsTestIsAsync = true; |
| 110 window.successfullyParsed = true; | 110 window.successfullyParsed = true; |
| 111 </script> | 111 </script> |
| 112 </body> | 112 </body> |
| 113 </html> | 113 </html> |
| OLD | NEW |