diff options
Diffstat (limited to 'net/reporting')
-rw-r--r-- | net/reporting/reporting_cache_unittest.cc | 11 | ||||
-rw-r--r-- | net/reporting/reporting_context.h | 5 | ||||
-rw-r--r-- | net/reporting/reporting_delivery_agent_unittest.cc | 11 | ||||
-rw-r--r-- | net/reporting/reporting_service_unittest.cc | 9 | ||||
-rw-r--r-- | net/reporting/reporting_test_util.h | 5 |
5 files changed, 10 insertions, 31 deletions
diff --git a/net/reporting/reporting_cache_unittest.cc b/net/reporting/reporting_cache_unittest.cc index 9c650a6aa..b55ed2106 100644 --- a/net/reporting/reporting_cache_unittest.cc +++ b/net/reporting/reporting_cache_unittest.cc @@ -1651,16 +1651,7 @@ TEST_P(ReportingCacheTest, EvictLeastImportantEndpoint) { EXPECT_TRUE(FindEndpointInCache(kGroupKey12_, kEndpoint1_)); } -// Test is flaky on Linux (https://crbug.com/1358967) -#if BUILDFLAG(IS_LINUX) -#define MAYBE_EvictEndpointsOverGlobalLimitFromStalestClient \ - DISABLED_EvictEndpointsOverGlobalLimitFromStalestClient -#else -#define MAYBE_EvictEndpointsOverGlobalLimitFromStalestClient \ - EvictEndpointsOverGlobalLimitFromStalestClient -#endif -TEST_P(ReportingCacheTest, - MAYBE_EvictEndpointsOverGlobalLimitFromStalestClient) { +TEST_P(ReportingCacheTest, EvictEndpointsOverGlobalLimitFromStalestClient) { LoadReportingClients(); // Set enough endpoints to reach the global endpoint limit. diff --git a/net/reporting/reporting_context.h b/net/reporting/reporting_context.h index 3f8eb9620..7f3b9dde3 100644 --- a/net/reporting/reporting_context.h +++ b/net/reporting/reporting_context.h @@ -43,7 +43,7 @@ class NET_EXPORT ReportingContext { ReportingContext(const ReportingContext&) = delete; ReportingContext& operator=(const ReportingContext&) = delete; - ~ReportingContext(); + virtual ~ReportingContext(); const ReportingPolicy& policy() const { return policy_; } @@ -98,7 +98,8 @@ class NET_EXPORT ReportingContext { std::unique_ptr<ReportingCache> cache_; - const raw_ptr<ReportingCache::PersistentReportingStore> store_; + const raw_ptr<ReportingCache::PersistentReportingStore, DanglingUntriaged> + store_; // |delivery_agent_| must come after |tick_clock_|, |delegate_|, |uploader_|, // and |cache_|. diff --git a/net/reporting/reporting_delivery_agent_unittest.cc b/net/reporting/reporting_delivery_agent_unittest.cc index 3bd1c28b2..abdaf2bb7 100644 --- a/net/reporting/reporting_delivery_agent_unittest.cc +++ b/net/reporting/reporting_delivery_agent_unittest.cc @@ -562,16 +562,7 @@ TEST_F(ReportingDeliveryAgentTest, ConcurrentRemove) { EXPECT_TRUE(reports.empty()); } -// Flaky on ChromeOS: https://crbug.com/1348434 -#if defined(CHROMEOS) -#define MAYBE_ConcurrentRemoveDuringPermissionsCheck \ - DISABLED_ConcurrentRemoveDuringPermissionsCheck -#else -#define MAYBE_ConcurrentRemoveDuringPermissionsCheck \ - ConcurrentRemoveDuringPermissionsCheck -#endif -TEST_F(ReportingDeliveryAgentTest, - MAYBE_ConcurrentRemoveDuringPermissionsCheck) { +TEST_F(ReportingDeliveryAgentTest, ConcurrentRemoveDuringPermissionsCheck) { // Pause the permissions check, so that we can try to remove some reports // while we're in the middle of verifying that we can upload them. (This is // similar to the previous test, but removes the reports during a different diff --git a/net/reporting/reporting_service_unittest.cc b/net/reporting/reporting_service_unittest.cc index 944b14958..ffcf0bc94 100644 --- a/net/reporting/reporting_service_unittest.cc +++ b/net/reporting/reporting_service_unittest.cc @@ -107,7 +107,7 @@ class ReportingServiceTest : public ::testing::TestWithParam<bool>, base::SimpleTestTickClock tick_clock_; std::unique_ptr<MockPersistentReportingStore> store_; - raw_ptr<TestReportingContext> context_; + raw_ptr<TestReportingContext, DanglingUntriaged> context_; std::unique_ptr<ReportingService> service_; }; @@ -334,12 +334,7 @@ TEST_P(ReportingServiceTest, context()->cache()->GetExpiredSources().contains(kReportingSource_)); } -#if BUILDFLAG(IS_CHROMEOS) -#define MAYBE_ProcessReportingEndpointsHeaderPathAbsolute DISABLED_ProcessReportingEndpointsHeaderPathAbsolute -#else -#define MAYBE_ProcessReportingEndpointsHeaderPathAbsolute ProcessReportingEndpointsHeaderPathAbsolute -#endif -TEST_P(ReportingServiceTest, MAYBE_ProcessReportingEndpointsHeaderPathAbsolute) { +TEST_P(ReportingServiceTest, ProcessReportingEndpointsHeaderPathAbsolute) { base::test::ScopedFeatureList feature_list; feature_list.InitAndEnableFeature(net::features::kDocumentReporting); auto parsed_header = ParseReportingEndpoints(kGroup_ + "=\"/path-absolute\""); diff --git a/net/reporting/reporting_test_util.h b/net/reporting/reporting_test_util.h index 61296c3df..b04849b95 100644 --- a/net/reporting/reporting_test_util.h +++ b/net/reporting/reporting_test_util.h @@ -162,7 +162,7 @@ class TestReportingContext : public ReportingContext { TestReportingContext(const TestReportingContext&) = delete; TestReportingContext& operator=(const TestReportingContext&) = delete; - ~TestReportingContext(); + ~TestReportingContext() override; base::MockOneShotTimer* test_delivery_timer() { return delivery_timer_; } base::MockOneShotTimer* test_garbage_collection_timer() { @@ -290,7 +290,8 @@ class ReportingTestBase : public TestWithTaskEnvironment { base::SimpleTestClock clock_; base::SimpleTestTickClock tick_clock_; std::unique_ptr<TestReportingContext> context_; - raw_ptr<ReportingCache::PersistentReportingStore> store_ = nullptr; + raw_ptr<ReportingCache::PersistentReportingStore, DanglingUntriaged> store_ = + nullptr; }; class TestReportingService : public ReportingService { |