chromium/components/component_updater/installer_policies/first_party_sets_component_installer_policy_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 "components/component_updater/installer_policies/first_party_sets_component_installer_policy.h"

#include "base/check.h"
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/callback_helpers.h"
#include "base/task/thread_pool.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "base/version.h"
#include "components/component_updater/mock_component_updater_service.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace component_updater {

namespace {

_;
IsEmpty;

std::string ReadToString(base::File file) {}

}  // namespace

class FirstPartySetsComponentInstallerTest : public ::testing::Test {};

TEST_F(FirstPartySetsComponentInstallerTest, NonexistentFile_OnComponentReady) {}

TEST_F(FirstPartySetsComponentInstallerTest,
       NonexistentFile_OnRegistrationComplete) {}

TEST_F(FirstPartySetsComponentInstallerTest, LoadsSets_OnComponentReady) {}

// Test that when the first version of the component is installed,
// ComponentReady is a no-op, because OnRegistrationComplete already executed
// the OnceCallback.
TEST_F(FirstPartySetsComponentInstallerTest, IgnoreNewSets_NoInitialComponent) {}

// Test if a component has been installed, ComponentReady will be no-op when
// newer versions are installed.
TEST_F(FirstPartySetsComponentInstallerTest, IgnoreNewSets_OnComponentReady) {}

TEST_F(FirstPartySetsComponentInstallerTest, GetInstallerAttributes) {}

}  // namespace component_updater