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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-localDescription.html

Issue 1661493002: Add promise-based addIceCandidate, setLocalDescription and setRemoteDescription to RTCPeerConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: yhirano's comments Created 4 years, 10 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
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 RTCPeerConnection localDescription."); 8 description("Tests RTCPeerConnection localDescription.");
9 9
10 var pc = null; 10 var pc = null;
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 function requestSucceeded1() 37 function requestSucceeded1()
38 { 38 {
39 testPassed('requestSucceeded was called.'); 39 testPassed('requestSucceeded was called.');
40 40
41 sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"} ); 41 sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"} );
42 shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded2 , requestFailed2);'); 42 shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded2 , requestFailed2);');
43 } 43 }
44 44
45 function expectedTypeError(error)
46 {
47 errorReason = error;
philipj_slow 2016/02/15 10:22:21 window.error = error is more obvious than a missin
Guido Urdaneta 2016/02/15 16:56:51 Done.
48 shouldBe('errorReason.name', '"TypeError"')
49 testPassed('expectedTypeError was called.')
50 }
51
52 function expectedInvalidSessionDescription(error)
53 {
54 testPassed('expectedInvalidSessionDescription was called.')
55 }
56
45 pc = new webkitRTCPeerConnection(null, null); 57 pc = new webkitRTCPeerConnection(null, null);
46 shouldThrow('pc.setLocalDescription(null)'); 58 shouldNotThrow('pc.setLocalDescription().catch(expectedTypeError)');
59 shouldNotThrow('pc.setLocalDescription(null).catch(expectedInvalidSessionDescrip tion)');
47 var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"}); 60 var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
48 shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded1, re questFailed1);'); 61 shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded1, re questFailed1);');
49 62
50
51 window.jsTestIsAsync = true; 63 window.jsTestIsAsync = true;
52 window.successfullyParsed = true; 64 window.successfullyParsed = true;
53 </script> 65 </script>
54 </body> 66 </body>
55 </html> 67 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698