# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//testing/test.gni")
source_set("browser") {
sources = [
"features.cc",
"features.h",
"layout_shift_normalization.cc",
"layout_shift_normalization.h",
"metrics_lifecycle_observer.cc",
"metrics_lifecycle_observer.h",
"metrics_navigation_throttle.cc",
"metrics_navigation_throttle.h",
"metrics_web_contents_observer.cc",
"metrics_web_contents_observer.h",
"navigation_handle_user_data.cc",
"navigation_handle_user_data.h",
"observers/abandoned_page_load_metrics_observer.cc",
"observers/abandoned_page_load_metrics_observer.h",
"observers/assert_page_load_metrics_observer.cc",
"observers/assert_page_load_metrics_observer.h",
"observers/back_forward_cache_page_load_metrics_observer.cc",
"observers/back_forward_cache_page_load_metrics_observer.h",
"observers/click_input_tracker.cc",
"observers/click_input_tracker.h",
"observers/core/largest_contentful_paint_handler.cc",
"observers/core/largest_contentful_paint_handler.h",
"observers/core/uma_page_load_metrics_observer.cc",
"observers/core/uma_page_load_metrics_observer.h",
"observers/core/unstarted_page_paint_observer.cc",
"observers/core/unstarted_page_paint_observer.h",
"observers/cross_origin_page_load_metrics_observer.cc",
"observers/cross_origin_page_load_metrics_observer.h",
"observers/early_hints_page_load_metrics_observer.cc",
"observers/early_hints_page_load_metrics_observer.h",
"observers/fenced_frames_page_load_metrics_observer.cc",
"observers/fenced_frames_page_load_metrics_observer.h",
"observers/performance_manager_metrics_observer.cc",
"observers/performance_manager_metrics_observer.h",
"observers/prerender_page_load_metrics_observer.cc",
"observers/prerender_page_load_metrics_observer.h",
"observers/privacy_sandbox_ads_page_load_metrics_observer.cc",
"observers/privacy_sandbox_ads_page_load_metrics_observer.h",
"observers/same_origin_page_load_metrics_observer.cc",
"observers/same_origin_page_load_metrics_observer.h",
"observers/shared_storage_page_load_metrics_observer.cc",
"observers/shared_storage_page_load_metrics_observer.h",
"observers/third_party_metrics_observer.cc",
"observers/third_party_metrics_observer.h",
"observers/uma_file_and_data_page_load_metrics_observer.cc",
"observers/uma_file_and_data_page_load_metrics_observer.h",
"observers/use_counter/at_most_once_enum_uma_deferrer.cc",
"observers/use_counter/at_most_once_enum_uma_deferrer.h",
"observers/use_counter/ukm_features.cc",
"observers/use_counter/webdev_metrics_ukm_features.cc",
"observers/use_counter_page_load_metrics_observer.cc",
"observers/use_counter_page_load_metrics_observer.h",
"observers/zstd_page_load_metrics_observer.cc",
"observers/zstd_page_load_metrics_observer.h",
"page_load_metrics_embedder_base.cc",
"page_load_metrics_embedder_base.h",
"page_load_metrics_embedder_interface.h",
"page_load_metrics_forward_observer.cc",
"page_load_metrics_forward_observer.h",
"page_load_metrics_memory_tracker.cc",
"page_load_metrics_memory_tracker.h",
"page_load_metrics_observer.cc",
"page_load_metrics_observer.h",
"page_load_metrics_observer_delegate.cc",
"page_load_metrics_observer_delegate.h",
"page_load_metrics_observer_interface.cc",
"page_load_metrics_observer_interface.h",
"page_load_metrics_update_dispatcher.cc",
"page_load_metrics_update_dispatcher.h",
"page_load_metrics_util.cc",
"page_load_metrics_util.h",
"page_load_tracker.cc",
"page_load_tracker.h",
"protocol_util.cc",
"protocol_util.h",
"resource_tracker.cc",
"resource_tracker.h",
"responsiveness_metrics_normalization.cc",
"responsiveness_metrics_normalization.h",
]
deps = [
"//base",
"//build:chromeos_buildflags",
"//components/keyed_service/content:content",
"//components/keyed_service/core:core",
"//components/metrics",
"//components/page_load_metrics/common",
"//components/page_load_metrics/common:page_load_metrics_mojom",
"//components/performance_manager:performance_manager",
"//content/public/browser",
"//content/public/common",
"//net",
"//services/metrics/public/cpp:ukm_builders",
"//ui/base",
]
}
source_set("test_support") {
testonly = true
sources = [
"ads_page_load_metrics_test_waiter.cc",
"ads_page_load_metrics_test_waiter.h",
"fake_page_load_metrics_observer_delegate.cc",
"fake_page_load_metrics_observer_delegate.h",
"observers/page_load_metrics_observer_tester.cc",
"observers/page_load_metrics_observer_tester.h",
"page_load_metrics_test_content_browser_client.cc",
"page_load_metrics_test_content_browser_client.h",
"page_load_metrics_test_waiter.cc",
"page_load_metrics_test_waiter.h",
"test_metrics_web_contents_observer_embedder.cc",
"test_metrics_web_contents_observer_embedder.h",
]
deps = [
":browser",
"//base",
"//base/test:test_support",
"//components/page_load_metrics/common:common",
"//components/page_load_metrics/common:page_load_metrics_mojom",
"//components/page_load_metrics/common:test_support",
"//components/ukm:test_support",
"//content/public/browser",
"//content/public/common",
"//content/test:test_support",
"//testing/gtest",
"//ui/gfx/geometry",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"layout_shift_normalization_unittest.cc",
"metrics_web_contents_observer_unittest.cc",
"observers/back_forward_cache_page_load_metrics_observer_unittest.cc",
"observers/click_input_tracker_unittest.cc",
"observers/core/uma_page_load_metrics_observer_unittest.cc",
"observers/core/unstarted_page_paint_observer_unittest.cc",
"observers/early_hints_page_load_metrics_observer_unittest.cc",
"observers/fenced_frames_page_load_metrics_observer_unittest.cc",
"observers/page_load_metrics_observer_content_test_harness.cc",
"observers/page_load_metrics_observer_content_test_harness.h",
"observers/privacy_sandbox_ads_page_load_metrics_observer_unittest.cc",
"observers/third_party_metrics_observer_unittest.cc",
"observers/uma_file_and_data_page_load_metrics_observer_unittest.cc",
"observers/use_counter/at_most_once_enum_uma_deferrer_unittest.cc",
"observers/use_counter_page_load_metrics_observer_unittest.cc",
"observers/zstd_page_load_metrics_observer_unittest.cc",
"page_load_metrics_forward_observer_unittest.cc",
"page_load_metrics_memory_tracker_unittest.cc",
"page_load_metrics_util_unittest.cc",
"page_load_tracker_unittest.cc",
"resource_tracker_unittest.cc",
"responsiveness_metrics_normalization_unittest.cc",
]
deps = [
":browser",
":test_support",
"//base/test:test_support",
"//components/keyed_service/content",
"//components/page_load_metrics/common:common",
"//components/page_load_metrics/common:page_load_metrics_mojom",
"//components/page_load_metrics/common:test_support",
"//components/performance_manager",
"//components/ukm:test_support",
"//components/ukm/content",
"//content/public/browser",
"//content/test:test_support",
"//services/metrics/public/cpp:ukm_builders",
"//testing/gtest",
"//url",
]
}