#include <string_view>
#include "base/test/trace_event_analyzer.h"
#include "build/build_config.h"
#include "chrome/browser/page_load_metrics/integration_tests/metric_integration_test.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_enums.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/page_load_metrics/browser/page_load_metrics_test_waiter.h"
#include "components/page_load_metrics/browser/page_load_metrics_util.h"
#include "content/common/content_navigation_policy.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/hit_test_region_observer.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "services/metrics/public/cpp/ukm_builders.h"
Bucket;
Value;
optional;
Query;
TraceAnalyzer;
TraceEventVector;
PageLoad;
class InteractionToNextPaintTest : public MetricIntegrationTest { … };
bool InteractionToNextPaintTest::ExtractUKMPageLoadMetric(
const ukm::TestUkmRecorder& ukm_recorder,
std::string_view metric_name,
int64_t* extracted_value) { … }
int InteractionToNextPaintTest::ExtractMaxInteractionDurationFromTrace(
TraceEventVector events) { … }
bool InteractionToNextPaintTest::VerifyUKMAndTraceData(
TraceAnalyzer& analyzer) { … }
void InteractionToNextPaintTest::InjectWaitJavaScript() { … }
void InteractionToNextPaintTest::WaitForFrameReady() { … }
IN_PROC_BROWSER_TEST_F(InteractionToNextPaintTest, INP_ClickOnPage) { … }
IN_PROC_BROWSER_TEST_F(InteractionToNextPaintTest, INP_ClickOnButton) { … }
IN_PROC_BROWSER_TEST_F(InteractionToNextPaintTest, INP_ClickWithPresentation) { … }
IN_PROC_BROWSER_TEST_F(InteractionToNextPaintTest,
DISABLED_INP_ReportBeforeNavigatingAway) { … }
IN_PROC_BROWSER_TEST_F(InteractionToNextPaintTest,
DISABLED_INP_ReportBeforeNavigatingAwayToCrossOrigin) { … }
IN_PROC_BROWSER_TEST_F(InteractionToNextPaintTest,
INP_ReportBeforeSwitchingTabAndNavigatingAway) { … }
IN_PROC_BROWSER_TEST_F(InteractionToNextPaintTest,
INP_ReportBeforeSwitchingTabAndCloseBackgroundedTab) { … }
IN_PROC_BROWSER_TEST_F(InteractionToNextPaintTest,
DISABLED_INP_ReportBeforeEnteringBFCache) { … }