Files
brave-core/browser/extensions/install_verifier_unittest.cc
Claudio DeSouza 40707f07a9 [cr143] Several extension install files moved
This affects a few file inclusion and the introduction of a factory for
the instantiation of one fo the classes, but all this is very minimal,
and straight up mechanical changes. The exception is that
install_verifier.cc override is including code from
brave/browser/extensions which would now be a layering violation. To
avoid adding new patches for dependencies, moved the content of
brave/browser/extensions/manifest_v2/brave_hosted_extensions.h/cc into
chromium_src overrides of extensions/browser/extension_util.h/cc.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/ad059894f54753f71cf686fa67677339254921b4

commit ad059894f54753f71cf686fa67677339254921b4
Author: Miyoung shin <myid.shin@igalia.com>
Date:   Fri Oct 17 06:55:39 2025 -0700

    Move InstallVerifier and related install* files to //extensions
    as they no longer depend on //chrome.

    This CL does not introduce any behavior changes, but it adds interfaces
    for plumbing to ExtensionManagement in ExtensionsBrowserClient.

    Bug: 358567092
    Change-Id: I38faba23335364c47a4f93c3d886d03dd44586a7
    Bypass-Check-License: Moving files
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7005871
    Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
    Reviewed-by: David Trainor <dtrainor@chromium.org>
    Reviewed-by: Mike West <mkwst@chromium.org>
    Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1531391}
2025-11-18 11:26:21 -05:00

24 lines
794 B
C++

/* Copyright (c) 2021 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "extensions/browser/install_verifier.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OFFICIAL_BUILD)
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
TEST(InstallVerifierUnitTest, TestShouldEnforce) {
EXPECT_TRUE(extensions::InstallVerifier::ShouldEnforce());
}
#else
TEST(InstallVerifierUnitTest, TestShouldNotEnforce) {
EXPECT_FALSE(extensions::InstallVerifier::ShouldEnforce());
}
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
#endif // defined(OFFICIAL_BUILD)