chromium/chrome/browser/extensions/extension_safety_check_utils_unittest.cc

// Copyright 2024 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/extensions/extension_safety_check_utils.h"

#include "base/strings/string_util.h"
#include "chrome/browser/extensions/api/developer_private/developer_private_api.h"
#include "chrome/browser/extensions/cws_info_service.h"
#include "chrome/browser/extensions/extension_management_test_util.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/testing_profile.h"
#include "components/crx_file/id_util.h"
#include "components/prefs/pref_service.h"
#include "components/supervised_user/core/common/features.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "content/public/test/browser_task_environment.h"
#include "extensions/browser/blocklist_extension_prefs.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/extension_urls.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"

namespace extensions {

class MockCWSInfoService : public CWSInfoServiceInterface {};

const scoped_refptr<const Extension> CreateExtension(
    const std::string& name,
    base::Value::List permissions,
    mojom::ManifestLocation location,
    const std::string& update_url = extension_urls::kChromeWebstoreUpdateURL) {}

// Ensures that the warning_reason and the safety check strings match.
void CheckSafetyCheckDisplayString(
    api::developer_private::SafetyCheckWarningReason warning_reason,
    api::developer_private::SafetyCheckStrings strings,
    bool extension_state = true) {}

class SafetyCheckExtensionUtilsTest : public testing::Test {};

TEST_F(SafetyCheckExtensionUtilsTest, SafetyCheck_Malware) {}

TEST_F(SafetyCheckExtensionUtilsTest, SafetyCheck_PrefMigration) {}

TEST_F(SafetyCheckExtensionUtilsTest, SafetyCheck_NoPrivacyPractice) {}

TEST_F(SafetyCheckExtensionUtilsTest, SafetyCheck_OffStore) {}

TEST_F(SafetyCheckExtensionUtilsTest, SafetyCheck_Policy) {}

TEST_F(SafetyCheckExtensionUtilsTest, SafetyCheck_PotentiallyUnwanted) {}

TEST_F(SafetyCheckExtensionUtilsTest, SafetyCheck_Unpublished) {}

TEST_F(SafetyCheckExtensionUtilsTest, SafetyCheck_No_Warning) {}

TEST_F(SafetyCheckExtensionUtilsTest, SafetyCheck_String_Check) {}
}  // namespace extensions