chromium/chrome/browser/extensions/api/browsing_data/browsing_data_unittest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/functional/callback.h"
#include "base/json/json_string_value_serializer.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "chrome/browser/browsing_data/chrome_browsing_data_remover_constants.h"
#include "chrome/browser/extensions/api/browsing_data/browsing_data_api.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/test_browser_window.h"
#include "components/browsing_data/content/browsing_data_helper.h"
#include "components/browsing_data/core/browsing_data_utils.h"
#include "components/browsing_data/core/pref_names.h"
#include "components/history/core/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browsing_data_remover.h"
#include "content/public/test/mock_browsing_data_remover_delegate.h"
#include "extensions/browser/api_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

RunFunctionAndReturnError;
RunFunctionAndReturnSingleResult;

namespace extensions {

namespace {

enum OriginTypeMask {};

// TODO(http://crbug.com/1266606): appcache is a noop and should be removed.
const char kRemoveEverythingArguments[] =;

class BrowsingDataApiTest : public ExtensionServiceTestBase {};

}  // namespace

TEST_F(BrowsingDataApiTest, RemovalProhibited) {}

TEST_F(BrowsingDataApiTest, RemoveBrowsingDataAll) {}

TEST_F(BrowsingDataApiTest, BrowsingDataOriginTypeMask) {}

TEST_F(BrowsingDataApiTest, BrowsingDataRemovalMask) {}

// Test an arbitrary combination of data types.
TEST_F(BrowsingDataApiTest, BrowsingDataRemovalMaskCombination) {}

// Make sure the remove() function accepts the format produced by settings().
TEST_F(BrowsingDataApiTest, BrowsingDataRemovalInputFromSettings) {}

TEST_F(BrowsingDataApiTest, ShortcutFunctionRemovalMask) {}

// Test the processing of the 'delete since' preference.
TEST_F(BrowsingDataApiTest, SettingsFunctionSince) {}

TEST_F(BrowsingDataApiTest, SettingsFunctionEmpty) {}

// Test straightforward settings, mapped 1:1 to data types.
TEST_F(BrowsingDataApiTest, SettingsFunctionSimple) {}

// Test cookie and app data settings.
TEST_F(BrowsingDataApiTest, SettingsFunctionSiteData) {}

// Test an arbitrary assortment of settings.
TEST_F(BrowsingDataApiTest, SettingsFunctionAssorted) {}

TEST_F(BrowsingDataApiTest, RemoveWithoutFilter) {}

TEST_F(BrowsingDataApiTest, RemoveWithDeleteListFilter) {}

TEST_F(BrowsingDataApiTest, RemoveWithPreserveListFilter) {}

TEST_F(BrowsingDataApiTest, RemoveWithSpecialUrlFilter) {}

TEST_F(BrowsingDataApiTest, RemoveCookiesWithFilter) {}

// Expect two separate BrowsingDataRemover calls if cookies and localstorage
// are passed with a filter.
TEST_F(BrowsingDataApiTest, RemoveCookiesAndStorageWithFilter) {}

TEST_F(BrowsingDataApiTest, RemoveWithFilterAndInvalidParameters) {}
}  // namespace extensions