#include "chrome/browser/page_load_metrics/observers/gws_hp_page_load_metrics_observer.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "build/build_config.h"
#include "chrome/browser/after_startup_task_utils.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/page_load_metrics/integration_tests/metric_integration_test.h"
#include "chrome/browser/page_load_metrics/observers/histogram_suffixes.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/chrome_test_utils.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 "components/page_load_metrics/common/test/page_load_metrics_test_util.h"
#include "components/ukm/test_ukm_recorder.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_navigation_throttle.h"
#include "content/public/test/test_navigation_throttle_inserter.h"
#include "net/test/embedded_test_server/request_handler_util.h"
namespace {
constexpr char kGoogleHomepageUrl[] = …;
constexpr char kNonGoogleHomepageUrl[] = …;
std::unique_ptr<net::test_server::HttpResponse> RequestHandler(
const net::test_server::HttpRequest& request) { … }
}
PageLoadMetricsTestWaiter;
class GWSHpPageLoadMetricsObserverBrowserTest : public MetricIntegrationTest { … };
IN_PROC_BROWSER_TEST_F(GWSHpPageLoadMetricsObserverBrowserTest,
FirstNavigationHomepage) { … }
IN_PROC_BROWSER_TEST_F(GWSHpPageLoadMetricsObserverBrowserTest,
SubsequentNavigationHomepage) { … }
IN_PROC_BROWSER_TEST_F(GWSHpPageLoadMetricsObserverBrowserTest, NoHomepage) { … }