chromium/chrome/browser/page_load_metrics/observers/core/amp_page_load_metrics_observer_unittest.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/page_load_metrics/observers/core/amp_page_load_metrics_observer.h"

#include <optional>
#include <string>
#include <utility>

#include "base/memory/ptr_util.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.h"
#include "components/page_load_metrics/browser/page_load_tracker.h"
#include "components/page_load_metrics/common/page_load_timing.h"
#include "components/page_load_metrics/common/test/page_load_metrics_test_util.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_utils.h"
#include "services/metrics/public/cpp/metrics_utils.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_source.h"
#include "url/gurl.h"

NavigationSimulator;
UserInteractionLatencies;
UserInteractionLatency;
UserInteractionType;

class AMPPageLoadMetricsObserverTest
    : public page_load_metrics::PageLoadMetricsObserverTestHarness,
      public testing::WithParamInterface<bool> {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(AMPPageLoadMetricsObserverTest, AMPCachePage) {}

TEST_P(AMPPageLoadMetricsObserverTest, GoogleSearchAMPCachePage) {}

TEST_P(AMPPageLoadMetricsObserverTest, GoogleSearchAMPCachePageBaseURL) {}

TEST_P(AMPPageLoadMetricsObserverTest, GoogleNewsAMPCachePage) {}

TEST_P(AMPPageLoadMetricsObserverTest, GoogleNewsAMPCachePageBaseURL) {}

TEST_P(AMPPageLoadMetricsObserverTest, NonAMPPage) {}

TEST_P(AMPPageLoadMetricsObserverTest, GoogleSearchAMPViewerSameDocument) {}

TEST_P(AMPPageLoadMetricsObserverTest, SubFrameInputBeforeNavigation) {}

TEST_P(AMPPageLoadMetricsObserverTest, SubFrameNavigationBeforeInput) {}

TEST_P(AMPPageLoadMetricsObserverTest, SubFrameMetrics) {}

TEST_P(AMPPageLoadMetricsObserverTest, SubFrameMetrics_LayoutInstability) {}

TEST_P(AMPPageLoadMetricsObserverTest,
       SubFrameMetrics_Layout_Shift_Normalization) {}

TEST_P(AMPPageLoadMetricsObserverTest,
       SubFrameResponsivenessMetricsNormalization) {}

TEST_P(AMPPageLoadMetricsObserverTest,
       SubFrameResponsivenessMetricsNormalizations) {}

TEST_P(AMPPageLoadMetricsObserverTest, SubFrameMetricsFullNavigation) {}

TEST_P(AMPPageLoadMetricsObserverTest, SubFrameRecordOnFullNavigation) {}

TEST_P(AMPPageLoadMetricsObserverTest, SubFrameRecordOnFrameDeleted) {}

TEST_P(AMPPageLoadMetricsObserverTest, SubFrameMultipleFrames) {}

TEST_P(AMPPageLoadMetricsObserverTest,
       SubFrameWithNonSameDocumentMainFrameNavigation) {}

TEST_P(AMPPageLoadMetricsObserverTest, NoSubFrameMetricsForNonAmpSubFrame) {}

TEST_P(AMPPageLoadMetricsObserverTest,
       NoSubFrameMetricsForSubFrameWithoutViewerUrl) {}