chromium/chrome/browser/page_load_metrics/observers/local_network_requests_page_load_metrics_observer_unittest.cc

// Copyright 2017 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/local_network_requests_page_load_metrics_observer.h"

#include <vector>

#include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.h"
#include "components/page_load_metrics/browser/page_load_metrics_observer.h"
#include "components/page_load_metrics/browser/page_load_metrics_util.h"
#include "components/page_load_metrics/browser/page_load_tracker.h"
#include "content/public/browser/global_request_id.h"
#include "content/public/test/navigation_simulator.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_source.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom.h"
#include "url/gurl.h"

namespace internal {

PageAddressInfo;

UkmMetricInfo;

static const PageAddressInfo
    kPublicPage =,
    kPublicPageIPv6 =,
    kPrivatePage =,
    kLocalhostPage =,
    kLocalhostPageIPv6 =,
    kPublicRequest1 =,
    kPublicRequest2 =,
    kSameSubnetRequest1 =,
    kSameSubnetRequest2 =,
    kSameSubnetRequest3 =,
    kDiffSubnetRequest1 =,
    kDiffSubnetRequest2 =,
    kDiffSubnetRequest3 =,
    kDiffSubnetRequest4 =,
    kLocalhostRequest1 =,  // WEB
    kLocalhostRequest2 =,  // DB
    kLocalhostRequest3 =,  // PRINT
    kLocalhostRequest4 =,  // DEV
    kLocalhostRequest5 =,  // OTHER
    kRouterRequest1 =,
    kRouterRequest2 =;

}  // namespace internal

class LocalNetworkRequestsPageLoadMetricsObserverTest
    : public page_load_metrics::PageLoadMetricsObserverTestHarness {};

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest, NoMetrics) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PublicPageIPv6PublicRequests) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PublicPagePublicRequests) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PrivatePageSelfRequests) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest, PrivatePageNoRequests) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest, LocalhostPage) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest, LocalhostPageIPv6) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PublicPageAllSuccessfulRequests) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PrivatePageAllSuccessfulRequests) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PrivatePageAllFailedRequests) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PublicPageMixedStatusRequests) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PublicPageLargeNumberOfRequests) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PublicPageRequestIpInUrlOnly) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest,
       PublicPageRequestIpNotPresent) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest, PrivatePageSubnet10) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest, PrivatePageSubnet172) {}

TEST_F(LocalNetworkRequestsPageLoadMetricsObserverTest, PrivatePageFailedLoad) {}