Commit d9cc48ee authored by Elad Alon's avatar Elad Alon Committed by Commit Bot

WebRTC Event Logging - Add browser_test for too-small-max-size

Bug: 775415
Change-Id: Ic08dd3bb772eff7e6c6884e0191c25b441500f02
Reviewed-on: https://chromium-review.googlesource.com/1142157
Commit-Queue: Elad Alon <eladalon@chromium.org>
Reviewed-by: default avatarHenrik Grunell <grunell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582581}
parent 3316df9b
...@@ -634,13 +634,23 @@ class WebrtcLoggingPrivateApiStartEventLoggingTestBase ...@@ -634,13 +634,23 @@ class WebrtcLoggingPrivateApiStartEventLoggingTestBase
protected: protected:
void SetUp() override { void SetUp() override {
auto const webrtc_remote_event_logging = features::kWebRtcRemoteEventLog; SetUpFeatures();
WebrtcLoggingPrivateApiTest::SetUp();
}
void SetUpFeatures() {
std::vector<base::Feature> enabled;
std::vector<base::Feature> disabled;
if (WebRtcEventLogCollectionFeature()) { if (WebRtcEventLogCollectionFeature()) {
scoped_feature_list_.InitAndEnableFeature(webrtc_remote_event_logging); enabled.push_back(features::kWebRtcRemoteEventLog);
} else { } else {
scoped_feature_list_.InitAndDisableFeature(webrtc_remote_event_logging); disabled.push_back(features::kWebRtcRemoteEventLog);
} }
WebrtcLoggingPrivateApiTest::SetUp();
enabled.push_back(features::kWebRtcRemoteEventLogGzipped);
scoped_feature_list_.InitWithFeatures(enabled, disabled);
} }
void SetUpInProcessBrowserTestFixture() override { void SetUpInProcessBrowserTestFixture() override {
...@@ -708,6 +718,18 @@ IN_PROC_BROWSER_TEST_F( ...@@ -708,6 +718,18 @@ IN_PROC_BROWSER_TEST_F(
error_message); error_message);
} }
IN_PROC_BROWSER_TEST_F(
WebrtcLoggingPrivateApiStartEventLoggingTestFeatureAndPolicyEnabled,
StartEventLoggingWithTooSmallMaxSize) {
const std::string peer_connection_id = "id";
SetUpPeerConnection(peer_connection_id);
const int max_size_bytes = 1;
constexpr bool expect_success = false;
const std::string error_message = kStartRemoteLoggingFailureMaxSizeTooSmall;
StartEventLogging(peer_connection_id, max_size_bytes, expect_success,
error_message);
}
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebrtcLoggingPrivateApiStartEventLoggingTestFeatureAndPolicyEnabled, WebrtcLoggingPrivateApiStartEventLoggingTestFeatureAndPolicyEnabled,
StartEventLoggingWithExcessiveMaxSizeFails) { StartEventLoggingWithExcessiveMaxSizeFails) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment