chromium/components/security_interstitials/content/security_interstitial_tab_helper_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 "components/security_interstitials/content/security_interstitial_tab_helper.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/i18n/rtl.h"
#include "base/memory/raw_ptr.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "components/security_interstitials/content/security_interstitial_controller_client.h"
#include "components/security_interstitials/content/security_interstitial_page.h"
#include "components/security_interstitials/content/settings_page_helper.h"
#include "components/security_interstitials/core/controller_client.h"
#include "components/security_interstitials/core/metrics_helper.h"
#include "content/public/browser/certificate_request_result_type.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/test/mock_navigation_handle.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_renderer_host.h"
#include "net/base/net_errors.h"
#include "net/test/cert_test_util.h"
#include "net/test/test_data_directory.h"
#include "third_party/blink/public/common/features.h"
#include "url/gurl.h"

namespace security_interstitials {

const char kTestSslMetricsName[] =;

std::unique_ptr<security_interstitials::MetricsHelper> CreateTestMetricsHelper(
    content::WebContents* web_contents) {}

class TestInterstitialPage : public SecurityInterstitialPage {};

class SecurityInterstitialTabHelperTest
    : public content::RenderViewHostTestHarness {};

// Tests that the helper properly handles the lifetime of a single blocking
// page, interleaved with other navigations.
TEST_F(SecurityInterstitialTabHelperTest, SingleBlockingPage) {}

// Tests that the helper properly handles the lifetime of multiple blocking
// pages, committed in a different order than they are created.
TEST_F(SecurityInterstitialTabHelperTest, MultipleBlockingPages) {}

// Tests that the helper properly handles a navigation that finishes without
// committing.
TEST_F(SecurityInterstitialTabHelperTest, NavigationDoesNotCommit) {}

class SecurityInterstitialTabHelperFencedFrameTest
    : public SecurityInterstitialTabHelperTest {};

// Tests that a FencedFrame does not close the interstitial page.
TEST_F(SecurityInterstitialTabHelperFencedFrameTest,
       FencedFrameDoesNotCloseInterstitialPage) {}

}  // namespace security_interstitials