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

Unified Diff: chrome/test/data/webrtc/peerconnection_getstats.js

Issue 2641263003: Performance measures of old and new RTCPeerConnection.getStats added. (Closed)
Patch Set: Fix windows compile error (change name of enum keys) Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webrtc/peerconnection_getstats.js
diff --git a/chrome/test/data/webrtc/peerconnection_getstats.js b/chrome/test/data/webrtc/peerconnection_getstats.js
index 6054a5cea7c19057127c4ec5898391e570d5ff35..e7718481d5a39f9800de893fee9f509867cc1344 100644
--- a/chrome/test/data/webrtc/peerconnection_getstats.js
+++ b/chrome/test/data/webrtc/peerconnection_getstats.js
@@ -301,6 +301,22 @@ function getStatsReportDictionary() {
}
/**
+ * Invokes the promise-based |RTCPeerConnection.getStats| and returns to test
+ * when done, not doing anything with the results. For testing performance.
+ *
+ * Returns "done" on success.
+ */
+function getStatsAndReturn() {
+ peerConnection_().getStats()
+ .then(function(report) {
+ returnToTest('done');
+ },
+ function(e) {
+ throw failTest('Promise was rejected: ' + e);
+ });
+}
+
+/**
* Returns a complete list of whitelisted "RTCStats.type" values as a
* JSON-stringified array of strings to the test.
*/

Powered by Google App Engine
This is Rietveld 408576698