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

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

Issue 1010393002: Fix issue of localDescription and remoteDescription getter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test case crash. Created 5 years, 7 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 remoteDescription."); 8 description("Tests RTCPeerConnection remoteDescription.");
9 9
10 var pc = null; 10 var pc = null;
11 var observation = null;
11 12
12 function requestFailed2() 13 function requestFailed2()
13 { 14 {
14 testPassed('requestFailed was called.'); 15 testPassed('requestFailed was called.');
15 16
16 shouldBeEqualToString('pc.remoteDescription.type', "answer"); 17 shouldBeEqualToString('pc.remoteDescription.type', "answer");
17 shouldBeEqualToString('pc.remoteDescription.sdp', "remote"); 18 shouldBeEqualToString('pc.remoteDescription.sdp', "remote");
18 pc.close(); 19 pc.close();
19 shouldBeEqualToString('pc.remoteDescription.type', "answer"); 20 shouldBeEqualToString('pc.remoteDescription.type', "answer");
20 shouldBeEqualToString('pc.remoteDescription.sdp', "remote"); 21 shouldBeEqualToString('pc.remoteDescription.sdp', "remote");
(...skipping 10 matching lines...) Expand all
31 function requestFailed1() 32 function requestFailed1()
32 { 33 {
33 testFailed('requestFailed was called.'); 34 testFailed('requestFailed was called.');
34 finishJSTest(); 35 finishJSTest();
35 } 36 }
36 37
37 function requestSucceeded1() 38 function requestSucceeded1()
38 { 39 {
39 testPassed('requestSucceeded was called.'); 40 testPassed('requestSucceeded was called.');
40 41
41 sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"}); 42 shouldBeTrue('pc.remoteDescription === sessionDescription');
42 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded 2, requestFailed2);'); 43 observation = internals.observeGC(pc.remoteDescription);
44 asyncGC(function() {
45 shouldBeFalse('observation.wasCollected');
46 sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local "});
47 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucce eded2, requestFailed2);');
48 });
43 } 49 }
44 50
45 pc = new webkitRTCPeerConnection(null, null); 51 pc = new webkitRTCPeerConnection(null, null);
46 var sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"} ); 52 var sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"} );
47 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded1, r equestFailed1);'); 53 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded1, r equestFailed1);');
48 54
49 55
50 window.jsTestIsAsync = true; 56 window.jsTestIsAsync = true;
51 window.successfullyParsed = true; 57 window.successfullyParsed = true;
52 </script> 58 </script>
53 </body> 59 </body>
54 </html> 60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698