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

Unified Diff: content/renderer/media/webrtc_uma_histograms_unittest.cc

Issue 287383002: Implement getMediaDevices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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
« no previous file with comments | « content/renderer/media/webrtc_uma_histograms.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_uma_histograms_unittest.cc
diff --git a/content/renderer/media/webrtc_uma_histograms_unittest.cc b/content/renderer/media/webrtc_uma_histograms_unittest.cc
index 7d3a9199fcb2fac9b5156aefe1b284e069ef508c..0a090cf6f3c0890c49cd673c2620e66dd93e3b27 100644
--- a/content/renderer/media/webrtc_uma_histograms_unittest.cc
+++ b/content/renderer/media/webrtc_uma_histograms_unittest.cc
@@ -33,6 +33,19 @@ TEST(PerSessionWebRTCAPIMetrics, CallOngoingGetUserMedia) {
metrics.LogUsageOnlyOnce(WEBKIT_GET_USER_MEDIA);
}
+TEST(PerSessionWebRTCAPIMetrics, NoCallOngoingGetMediaDevices) {
+ MockPerSessionWebRTCAPIMetrics metrics;
+ EXPECT_CALL(metrics, LogUsage(_)).Times(1);
+ metrics.LogUsageOnlyOnce(WEBKIT_GET_MEDIA_DEVICES);
+}
+
+TEST(PerSessionWebRTCAPIMetrics, CallOngoingGetMediaDevices) {
+ MockPerSessionWebRTCAPIMetrics metrics;
+ metrics.IncrementStreamCounter();
+ EXPECT_CALL(metrics, LogUsage(WEBKIT_GET_MEDIA_DEVICES)).Times(1);
+ metrics.LogUsageOnlyOnce(WEBKIT_GET_MEDIA_DEVICES);
+}
+
TEST(PerSessionWebRTCAPIMetrics, NoCallOngoingRTCPeerConnection) {
MockPerSessionWebRTCAPIMetrics metrics;
EXPECT_CALL(metrics, LogUsage(WEBKIT_RTC_PEER_CONNECTION));
« no previous file with comments | « content/renderer/media/webrtc_uma_histograms.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698