// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_PAGE_LOAD_METRICS_BROWSER_OBSERVERS_ASSERT_PAGE_LOAD_METRICS_OBSERVER_H_ #define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_OBSERVERS_ASSERT_PAGE_LOAD_METRICS_OBSERVER_H_ #include "components/page_load_metrics/browser/page_load_metrics_observer_interface.h" // Asserts the constraints of methods of PageLoadMetricsObserver using // ovserver-level forwarding (i.e. PageLoadMetricsForwardObserver) as code and // checks the behavior in browsertests of PageLoadMetricsObservers. // // This class will be added iff `DCHECK_IS_ON()`. // // The list of methods are not complete. For most ones among missing ones, we // have no (non trivial) assumption on callback timings. // // Note that this inherits PageLoadMetricsObserverInterface rather than // PageLoadMetricsObserver to encourage to write assertions for newly added // methods. class AssertPageLoadMetricsObserver final : public page_load_metrics::PageLoadMetricsObserverInterface { … }; #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_OBSERVERS_ASSERT_PAGE_LOAD_METRICS_OBSERVER_H_