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

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

Issue 1729563002: Replace RTCErrorCallback with RTCPeerConnectionErrorCallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 createOffer."); 8 description("Tests RTCPeerConnection createOffer.");
9 9
10 // Note: createOffer() calls in the test runner are successful if the 10 // Note: createOffer() calls in the test runner are successful if the
11 // voiceActivityDetection and iceRestart options are passed with a value of true . 11 // voiceActivityDetection and iceRestart options are passed with a value of true .
12 // In all other cases, createOffer() fails in the test runner. 12 // In all other cases, createOffer() fails in the test runner.
13 13
14 var pc = null; 14 var pc = null;
15 15
16 function dummy() {} 16 function dummy() {}
17 17
18 function requestFailed2(reason) 18 function requestFailed2(error)
19 { 19 {
20 testPassed('requestFailed was called.'); 20 testPassed('requestFailed was called.');
21 21
22 errorReason = reason; 22 window.error = error;
23 shouldBe('errorReason', '"TEST_ERROR"'); 23 shouldBe('error.name', '"OperationError"');
24 shouldBe('error.toString()', '"OperationError: TEST_ERROR"');
24 25
25 shouldNotThrow("pc.createOffer(dummy, dummy);"); 26 shouldNotThrow("pc.createOffer(dummy, dummy);");
26 shouldNotThrow("pc.createOffer(dummy, dummy, {});"); 27 shouldNotThrow("pc.createOffer(dummy, dummy, {});");
27 shouldNotThrow("pc.createOffer(dummy, dummy, {voiceActivityDetection:false}) ;"); 28 shouldNotThrow("pc.createOffer(dummy, dummy, {voiceActivityDetection:false}) ;");
28 shouldNotThrow("pc.createOffer(dummy, dummy, {iceRestart:true});"); 29 shouldNotThrow("pc.createOffer(dummy, dummy, {iceRestart:true});");
29 shouldNotThrow("pc.createOffer(dummy, dummy, {voiceActivityDetection:false, iceRestart:true});"); 30 shouldNotThrow("pc.createOffer(dummy, dummy, {voiceActivityDetection:false, iceRestart:true});");
30 31
31 // Deprecated. 32 // Deprecated.
32 shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:-1, offerToRe ceiveAudio:0});"); 33 shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:-1, offerToRe ceiveAudio:0});");
33 shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:0, offerToRec eiveAudio:-1});"); 34 shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:0, offerToRec eiveAudio:-1});");
(...skipping 25 matching lines...) Expand all
59 } 60 }
60 61
61 pc = new webkitRTCPeerConnection(null); 62 pc = new webkitRTCPeerConnection(null);
62 pc.createOffer(requestSucceeded1, requestFailed1, {voiceActivityDetection:true, iceRestart:true}); 63 pc.createOffer(requestSucceeded1, requestFailed1, {voiceActivityDetection:true, iceRestart:true});
63 64
64 window.jsTestIsAsync = true; 65 window.jsTestIsAsync = true;
65 window.successfullyParsed = true; 66 window.successfullyParsed = true;
66 </script> 67 </script>
67 </body> 68 </body>
68 </html> 69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698