Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: LayoutTests/fast/mediastream/RTCPeerConnection-ice.html

Issue 650063002: Move MediaStream and MediaStreamTrack implementation from modules/mediastream to core/mediastream. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.");
9
10 var pc = null;
11 var iceCandidate = null;
12
13 function onIceChange2()
14 {
15 if (pc.iceConnectionState === "closed") {
16 testPassed("iceConnectionState is closed.");
17 finishJSTest();
18 }
19 }
20
21 function addIceCandidateSuccess()
22 {
23 testPassed("addIceCandidateSuccess was called.");
24 pc.oniceconnectionstatechange = onIceChange2;
25 pc.close();
26 }
27
28 function addIceCandidateFailure()
29 {
30 testFailed("addIceCandidateFailue was called.");
31 finishJSTest();
32 }
33
34 function onIceChange1()
35 {
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, nu ll);');
42 shouldNotThrow('pc.addIceCandidate(iceCandidate, addIceCandidateSuccess, addIceCandidateFailure);');
43 }
44 }
45
46 shouldNotThrow('pc = new webkitRTCPeerConnection(null, null);');
47 pc.oniceconnectionstatechange = onIceChange1;
48
49 window.jsTestIsAsync = true;
50 window.successfullyParsed = true;
51 </script>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698