OLD | NEW |
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 Loading... |
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> |
OLD | NEW |