Skip to content

Commit

Permalink
Delete crashing CobaltMetricsLogUploader test (youtube#660)
Browse files Browse the repository at this point in the history
This test what might happen if a non-gzipped payload gets sent by Chromium to
our libraries. This payload being compressed is fundamental to the API provided
by the underlying Chromium libraries and will not change. If it does, that's a
wider refactor and would break a lot of stuff. It's kind of just testing the
public API stays the same of //components/metrics, which really isn't a good
unit test.

b/287972956

Change-Id: I3690b93ac8fd3a26742ae41a6fca931c29cf9c5e
Former-commit-id: a8a235c
  • Loading branch information
joeltine committed Jun 20, 2023
1 parent 7aa583d commit 5f329a0
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions cobalt/browser/metrics/cobalt_metrics_log_uploader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,6 @@ TEST_F(CobaltMetricsLogUploaderTest, UnknownMetricTypeDoesntTriggerUpload) {
ASSERT_EQ(callback_count_, 1);
}

TEST_F(CobaltMetricsLogUploaderTest, BadCompressedDataSendsEmptyString) {
StrictMock<MockMetricsUploaderCallback> mock_upload_handler;
uploader_->SetOnUploadHandler(&mock_upload_handler);
::metrics::ReportingInfo dummy_reporting_info;
EXPECT_CALL(mock_upload_handler, Run(_, Eq(""))).Times(1);
// "bad data" isn't a compressed serialized proto, should just try to upload
// empty string.
uploader_->UploadLog("bad data", "fake_hash", dummy_reporting_info);
ASSERT_EQ(callback_count_, 1);
}

} // namespace metrics
} // namespace browser
} // namespace cobalt

0 comments on commit 5f329a0

Please sign in to comment.