Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / mediastream / RTCPeerConnection-ice.html
blobf489753ca36b69a5dca30943b75455ca8a651a58
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Tests the RTCPeerConnection Ice functionality.");
10 var pc = null;
11 var iceCandidate = null;
13 function onIceChange2()
15 if (pc.iceConnectionState === "closed") {
16 testPassed("iceConnectionState is closed.");
17 finishJSTest();
21 function addIceCandidateSuccess()
23 testPassed("addIceCandidateSuccess was called.");
24 pc.oniceconnectionstatechange = onIceChange2;
25 pc.close();
28 function addIceCandidateFailure()
30 testFailed("addIceCandidateFailue was called.");
31 finishJSTest();
34 function onIceChange1()
36 if (pc.iceConnectionState === "completed") {
37 testPassed("iceConnectionState is completed");
38 iceCandidate = new RTCIceCandidate({candidate:"nano nano"});
39 shouldThrow('pc.addIceCandidate(null, null, null);');
40 shouldThrow('pc.addIceCandidate(iceCandidate, null, null);');
41 shouldThrow('pc.addIceCandidate(iceCandidate, addIceCandidateSuccess, null);');
42 shouldNotThrow('pc.addIceCandidate(iceCandidate, addIceCandidateSuccess, addIceCandidateFailure);');
46 shouldNotThrow('pc = new webkitRTCPeerConnection(null, null);');
47 pc.oniceconnectionstatechange = onIceChange1;
49 window.jsTestIsAsync = true;
50 window.successfullyParsed = true;
51 </script>
52 </body>
53 </html>