#include "chrome/browser/page_load_metrics/integration_tests/metric_integration_test.h"
#include "base/test/trace_event_analyzer.h"
#include "build/build_config.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/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/hit_test_region_observer.h"
#include "services/metrics/public/cpp/ukm_builders.h"
Bucket;
Value;
optional;
ShiftFrame;
Query;
TraceAnalyzer;
TraceEventVector;
PageLoad;
class LayoutInstabilityTest : public MetricIntegrationTest { … };
void LayoutInstabilityTest::RunWPT(const std::string& test_file,
ShiftFrame frame,
uint64_t num_layout_shifts,
bool check_UKM_UMA_metrics) { … }
double LayoutInstabilityTest::CheckTraceData(Value::List& expectations,
TraceAnalyzer& analyzer) { … }
void LayoutInstabilityTest::CheckSources(const Value::List& expected_sources,
const Value::List& trace_sources) { … }
void LayoutInstabilityTest::CheckUKMAndUMAMetrics(double expect_score) { … }
std::pair<double, double> LayoutInstabilityTest::GetCLSFromList(
Value::List& entry_records_list) { … }
void LayoutInstabilityTest::CheckUKMAndUMAMetricsWithValues(
double totalCls,
double normalizedCls) { … }
void LayoutInstabilityTest::WaitForFrameReady() { … }
IN_PROC_BROWSER_TEST_F(LayoutInstabilityTest, SimpleBlockMovement) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_Sources_Enclosure …
#else
#define MAYBE_Sources_Enclosure …
#endif
IN_PROC_BROWSER_TEST_F(LayoutInstabilityTest, MAYBE_Sources_Enclosure) { … }
IN_PROC_BROWSER_TEST_F(LayoutInstabilityTest, DISABLED_Sources_MaxImpact) { … }
IN_PROC_BROWSER_TEST_F(LayoutInstabilityTest, OOPIFSubframeWeighting) { … }
IN_PROC_BROWSER_TEST_F(LayoutInstabilityTest,
CumulativeLayoutShift_OneSecondGap) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_CumulativeLayoutShift_hadRecentInput …
#else
#define MAYBE_CumulativeLayoutShift_hadRecentInput …
#endif
IN_PROC_BROWSER_TEST_F(LayoutInstabilityTest,
MAYBE_CumulativeLayoutShift_hadRecentInput) { … }