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

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

Issue 2395503002: WebRTCStatsMember: Support for bool and sequence of bool (Closed)
Patch Set: Created 4 years, 2 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> 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 webkitRTCPeerConnection(null);
(...skipping 11 matching lines...) Expand all
22 assert_true(stringify_equals(s, report.get(s.id))); 22 assert_true(stringify_equals(s, report.get(s.id)));
23 }); 23 });
24 24
25 // Verify that the report contains the same stats that 25 // Verify that the report contains the same stats that
26 // |MockWebRTCPeerConnectionHandler::getStats| should produce. 26 // |MockWebRTCPeerConnectionHandler::getStats| should produce.
27 assert_equals(statsCount, 1); 27 assert_equals(statsCount, 1);
28 var stats = report.get('mock-stats-01'); 28 var stats = report.get('mock-stats-01');
29 assert_true(stats != null); 29 assert_true(stats != null);
30 assert_equals(stats.type, 'mock-stats'); 30 assert_equals(stats.type, 'mock-stats');
31 assert_equals(stats.timestamp, 1234.0); 31 assert_equals(stats.timestamp, 1234.0);
32 assert_equals(stats.bool, true);
32 assert_equals(stats.int32, 42); 33 assert_equals(stats.int32, 42);
33 assert_equals(stats.uint32, 42); 34 assert_equals(stats.uint32, 42);
34 assert_equals(stats.int64, 42); 35 assert_equals(stats.int64, 42);
35 assert_equals(stats.uint64, 42); 36 assert_equals(stats.uint64, 42);
36 assert_equals(stats.double, 42); 37 assert_equals(stats.double, 42);
37 assert_equals(stats.string, '42'); 38 assert_equals(stats.string, '42');
39 assert_true(stringify_equals(stats.sequenceBool, [true]));
38 assert_true(stringify_equals(stats.sequenceInt32, [42])); 40 assert_true(stringify_equals(stats.sequenceInt32, [42]));
39 assert_true(stringify_equals(stats.sequenceUint32, [42])); 41 assert_true(stringify_equals(stats.sequenceUint32, [42]));
40 assert_true(stringify_equals(stats.sequenceInt64, [42])); 42 assert_true(stringify_equals(stats.sequenceInt64, [42]));
41 assert_true(stringify_equals(stats.sequenceUint64, [42])); 43 assert_true(stringify_equals(stats.sequenceUint64, [42]));
42 assert_true(stringify_equals(stats.sequenceDouble, [42])); 44 assert_true(stringify_equals(stats.sequenceDouble, [42]));
43 assert_true(stringify_equals(stats.sequenceString, ['42'])); 45 assert_true(stringify_equals(stats.sequenceString, ['42']));
44 } 46 }
45 47
46 promise_test(function() { 48 promise_test(function() {
47 return navigator.mediaDevices.getUserMedia({audio:true, video:true}) 49 return navigator.mediaDevices.getUserMedia({audio:true, video:true})
(...skipping 25 matching lines...) Expand all
73 pc.addStream(mediaStream); 75 pc.addStream(mediaStream);
74 return pc.getStats() 76 return pc.getStats()
75 .then(function(report) { 77 .then(function(report) {
76 assert_expected_report(report); 78 assert_expected_report(report);
77 }); 79 });
78 }); 80 });
79 }, 'getStats()'); 81 }, 'getStats()');
80 </script> 82 </script>
81 </body> 83 </body>
82 </html> 84 </html>
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc/rtc_stats.cc ('k') | third_party/WebKit/Source/modules/peerconnection/RTCStatsReport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698