chromium/chrome/browser/ui/webui/webui_allowlist_provider_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 <map>
#include <memory>

#include "base/test/gtest_util.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/content_settings/mock_settings_observer.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/content_settings/core/browser/content_settings_observer.h"
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/content_settings/core/common/pref_names.h"
#include "net/cookies/cookie_constants.h"
#include "net/cookies/site_for_cookies.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/webui/webui_allowlist.h"
#include "ui/webui/webui_allowlist_provider.h"
#include "url/origin.h"

_;

class WebUIAllowlistProviderTest : public ChromeRenderViewHostTestHarness {};

TEST_F(WebUIAllowlistProviderTest, RegisterChrome) {}

TEST_F(WebUIAllowlistProviderTest, RegisterChromeUntrusted) {}

#if DCHECK_IS_ON()
#define MAYBE_UnsupportedSchemes
#else
#define MAYBE_UnsupportedSchemes
#endif
TEST_F(WebUIAllowlistProviderTest, MAYBE_UnsupportedSchemes) {}

#if DCHECK_IS_ON()
#define MAYBE_UnsupportedThirdPartyCookiesSettings
#else
#define MAYBE_UnsupportedThirdPartyCookiesSettings
#endif
TEST_F(WebUIAllowlistProviderTest, MAYBE_UnsupportedThirdPartyCookiesSettings) {}

#if DCHECK_IS_ON()
#define MAYBE_InvalidContentSetting
#else
#define MAYBE_InvalidContentSetting
#endif
TEST_F(WebUIAllowlistProviderTest, MAYBE_InvalidContentSetting) {}

TEST_F(WebUIAllowlistProviderTest, AutoGrantPermissionIsPerProfile) {}

TEST_F(WebUIAllowlistProviderTest, RegisterDevtools) {}

TEST_F(WebUIAllowlistProviderTest, RegisterWithPermissionList) {}

TEST_F(WebUIAllowlistProviderTest,
       RegisterThirdPartyCookiesWithAllCookiesBlocked) {}

TEST_F(WebUIAllowlistProviderTest,
       RegisterThirdPartyCookiesWithThirdPartyCookiesBlocked) {}

TEST_F(WebUIAllowlistProviderTest, RegisterThirdPartyCookiesNotifiesOnlyOnce) {}

// Regression test for https://crbug.com/1514740.
TEST_F(WebUIAllowlistProviderTest, CookieSettings) {}