Chromium Code Reviews| Index: chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc |
| diff --git a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc |
| index bc739df844d68867e99898a0f4adf4b8dc591b75..7b160cd860bb349395ea933b49af9fa9274ac3b0 100644 |
| --- a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc |
| +++ b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_apitest.cc |
| @@ -33,6 +33,8 @@ using extensions::WebrtcLoggingPrivateUploadFunction; |
| using extensions::WebrtcLoggingPrivateUploadStoredFunction; |
| using extensions::WebrtcLoggingPrivateStartAudioDebugRecordingsFunction; |
| using extensions::WebrtcLoggingPrivateStopAudioDebugRecordingsFunction; |
| +using extensions::WebrtcLoggingPrivateStartRtcEventLoggingFunction; |
| +using extensions::WebrtcLoggingPrivateStopRtcEventLoggingFunction; |
| namespace utils = extension_function_test_utils; |
| @@ -181,6 +183,21 @@ class WebrtcLoggingPrivateApiTest : public ExtensionApiTest { |
| params, true); |
| } |
| + bool StartRtcEventLogging(int seconds) { |
| + base::ListValue params; |
| + AppendTabIdAndUrl(¶ms); |
| + params.AppendInteger(seconds); |
| + return RunFunction<WebrtcLoggingPrivateStartRtcEventLoggingFunction>(params, |
| + true); |
| + } |
| + |
| + bool StopRtcEventLogging() { |
| + base::ListValue params; |
| + AppendTabIdAndUrl(¶ms); |
| + return RunFunction<WebrtcLoggingPrivateStopRtcEventLoggingFunction>(params, |
| + true); |
| + } |
| + |
| private: |
| scoped_refptr<Extension> extension_; |
| }; |
| @@ -443,3 +460,21 @@ IN_PROC_BROWSER_TEST_F(WebrtcLoggingPrivateApiTest, |
| switches::kEnableAudioDebugRecordingsFromExtension); |
| ASSERT_TRUE(StartAudioDebugRecordings(1)); |
| } |
| + |
| +IN_PROC_BROWSER_TEST_F(WebrtcLoggingPrivateApiTest, |
| + TestStartStopRtcEventLogging) { |
| + // TODO(terelius): These tests are missing verification of the actual RTC |
|
Henrik Grunell
2016/02/01 13:58:13
At a minimum, I think you should check that the fi
|
| + // event log data. Maybe this could be incorporated into crbug.com/569957, |
| + // and solved at the same time? |
| + base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| + switches::kEnableRtcEventLoggingFromExtension); |
| + ASSERT_TRUE(StartRtcEventLogging(0)); |
| + ASSERT_TRUE(StopRtcEventLogging()); |
| +} |
| + |
| +IN_PROC_BROWSER_TEST_F(WebrtcLoggingPrivateApiTest, |
| + TestStartTimedRtcEventLogging) { |
| + base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| + switches::kEnableRtcEventLoggingFromExtension); |
| + ASSERT_TRUE(StartRtcEventLogging(1)); |
| +} |