| 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..2c671e9ffc7d3e880017e0da197ab01d40b62c5b 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::WebrtcLoggingPrivateStartWebRtcEventLoggingFunction;
|
| +using extensions::WebrtcLoggingPrivateStopWebRtcEventLoggingFunction;
|
|
|
| namespace utils = extension_function_test_utils;
|
|
|
| @@ -181,6 +183,21 @@ class WebrtcLoggingPrivateApiTest : public ExtensionApiTest {
|
| params, true);
|
| }
|
|
|
| + bool StartWebRtcEventLogging(int seconds) {
|
| + base::ListValue params;
|
| + AppendTabIdAndUrl(¶ms);
|
| + params.AppendInteger(seconds);
|
| + return RunFunction<WebrtcLoggingPrivateStartWebRtcEventLoggingFunction>(
|
| + params, true);
|
| + }
|
| +
|
| + bool StopWebRtcEventLogging() {
|
| + base::ListValue params;
|
| + AppendTabIdAndUrl(¶ms);
|
| + return RunFunction<WebrtcLoggingPrivateStopWebRtcEventLoggingFunction>(
|
| + 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,
|
| + TestStartStopWebRtcEventLogging) {
|
| + // TODO(terelius): These tests are missing verification of the actual RTC
|
| + // event log data. Maybe this could be incorporated into crbug.com/569957,
|
| + // and solved at the same time?
|
| + base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| + switches::kEnableWebRtcEventLoggingFromExtension);
|
| + ASSERT_TRUE(StartWebRtcEventLogging(0));
|
| + ASSERT_TRUE(StopWebRtcEventLogging());
|
| +}
|
| +
|
| +IN_PROC_BROWSER_TEST_F(WebrtcLoggingPrivateApiTest,
|
| + TestStartTimedWebRtcEventLogging) {
|
| + base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| + switches::kEnableWebRtcEventLoggingFromExtension);
|
| + ASSERT_TRUE(StartWebRtcEventLogging(1));
|
| +}
|
|
|