From c1f941255c852f8ce730612b539734c1bfd432eb Mon Sep 17 00:00:00 2001 From: Joel Martinez Date: Tue, 20 Jun 2023 11:06:17 -0600 Subject: [PATCH] Delete crashing CobaltMetricsLogUploader test (#660) 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 (cherry picked from commit a8a235c4ff117eb4c861093a05650b876b78015e) --- .../metrics/cobalt_metrics_log_uploader_test.cc | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cobalt/browser/metrics/cobalt_metrics_log_uploader_test.cc b/cobalt/browser/metrics/cobalt_metrics_log_uploader_test.cc index 123366f279a5..8baaa8e85b22 100644 --- a/cobalt/browser/metrics/cobalt_metrics_log_uploader_test.cc +++ b/cobalt/browser/metrics/cobalt_metrics_log_uploader_test.cc @@ -113,17 +113,6 @@ TEST_F(CobaltMetricsLogUploaderTest, UnknownMetricTypeDoesntTriggerUpload) { ASSERT_EQ(callback_count_, 1); } -TEST_F(CobaltMetricsLogUploaderTest, BadCompressedDataSendsEmptyString) { - StrictMock 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