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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-getStats-promise.html

Issue 2446173002: Use RTCPeerConnection instead of webkitRTCPeerConnection (Closed)
Patch Set: rebase Created 4 years, 1 month 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> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>RTCPeerConnection.getStats</title> 4 <title>RTCPeerConnection.getStats</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <script> 9 <script>
10 var pc = new webkitRTCPeerConnection(null); 10 var pc = new RTCPeerConnection();
11 11
12 function stringify_equals(d1, d2) { 12 function stringify_equals(d1, d2) {
13 return JSON.stringify(d1) == JSON.stringify(d2); 13 return JSON.stringify(d1) == JSON.stringify(d2);
14 } 14 }
15 15
16 function assert_expected_report(report) { 16 function assert_expected_report(report) {
17 assert_true(report != null); 17 assert_true(report != null);
18 var statsCount = 0; 18 var statsCount = 0;
19 report.forEach(function(s) { 19 report.forEach(function(s) {
20 assert_true(s != null); 20 assert_true(s != null);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 pc.addStream(mediaStream); 75 pc.addStream(mediaStream);
76 return pc.getStats() 76 return pc.getStats()
77 .then(function(report) { 77 .then(function(report) {
78 assert_expected_report(report); 78 assert_expected_report(report);
79 }); 79 });
80 }); 80 });
81 }, 'getStats()'); 81 }, 'getStats()');
82 </script> 82 </script>
83 </body> 83 </body>
84 </html> 84 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698