chromium/components/blocked_content/popup_blocker_tab_helper_unittest.cc

// Copyright 2020 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/blocked_content/popup_blocker_tab_helper.h"

#include "base/memory/raw_ptr.h"
#include "base/scoped_observation.h"
#include "base/test/scoped_feature_list.h"
#include "components/blocked_content/popup_navigation_delegate.h"
#include "components/blocked_content/safe_browsing_triggered_popup_blocker.h"
#include "components/blocked_content/test/test_popup_navigation_delegate.h"
#include "components/blocked_content/url_list_manager.h"
#include "components/content_settings/browser/page_specific_content_settings.h"
#include "components/content_settings/browser/test_page_specific_content_settings_delegate.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "content/public/test/mock_navigation_handle.h"
#include "content/public/test/test_renderer_host.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/mojom/window_features/window_features.mojom.h"
#include "ui/base/window_open_disposition.h"

namespace blocked_content {
namespace {
Pair;
UnorderedElementsAre;

constexpr char kUrl1[] =;
constexpr char kUrl2[] =;

// Observer which allows retrieving a map of all the blocked URLs.
class BlockedUrlListObserver : public UrlListManager::Observer {};
}  // namespace

class PopupBlockerTabHelperTest : public content::RenderViewHostTestHarness {};

TEST_F(PopupBlockerTabHelperTest, BlocksAndShowsPopup) {}

TEST_F(PopupBlockerTabHelperTest, MultiplePopups) {}

TEST_F(PopupBlockerTabHelperTest, DoesNotShowPopupWithInvalidID) {}

TEST_F(PopupBlockerTabHelperTest, SetsContentSettingsPopupState) {}

TEST_F(PopupBlockerTabHelperTest, ClearsContentSettingsPopupStateOnNavigation) {}

TEST_F(PopupBlockerTabHelperTest,
       NavigatingNonPrimaryDoesntClearsContentSettings) {}

}  // namespace blocked_content