test_peerConnection_bug1227781.html (693B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <script type="application/javascript" src="pc.js"></script> 5 </head> 6 <body> 7 <pre id="test"> 8 <script type="application/javascript"> 9 createHTML({ 10 bug: "1227781", 11 title: "Test with invalid TURN server" 12 }); 13 14 const turnConfig = { 15 iceServers: [ 16 { 17 username: "mozilla", 18 credential: "mozilla", 19 url: "turn:test@10.0.0.1", 20 }, 21 ], 22 }; 23 runNetworkTest(function (options) { 24 let exception = false; 25 try { 26 new RTCPeerConnection(turnConfig); 27 } catch (e) { 28 info(e); 29 exception = true; 30 } 31 is(exception, true, "Exception fired"); 32 ok("Success"); 33 }); 34 </script> 35 </pre> 36 </body> 37 </html>