#include "components/component_updater/component_updater_service.h"
#include <algorithm>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "base/values.h"
#include "build/branding_buildflags.h"
#include "components/component_updater/component_updater_service_internal.h"
#include "components/prefs/testing_pref_service.h"
#include "components/update_client/crx_update_item.h"
#include "components/update_client/test_configurator.h"
#include "components/update_client/test_installer.h"
#include "components/update_client/update_client.h"
#include "components/update_client/update_client_errors.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
Configurator;
Result;
TestConfigurator;
UpdateClient;
_;
AnyNumber;
Invoke;
Mock;
Return;
Unused;
namespace component_updater {
class MockInstaller : public update_client::CrxInstaller { … };
class MockUpdateClient : public UpdateClient { … };
class MockServiceObserver : public ServiceObserver { … };
class MockUpdateScheduler : public UpdateScheduler { … };
class LoopHandler { … };
class ComponentUpdaterTest : public testing::Test { … };
class OnDemandTester { … };
void OnDemandTester::OnDemand(ComponentUpdateService* cus,
const std::string& id,
OnDemandUpdater::Priority priority) { … }
void OnDemandTester::OnDemandComplete(update_client::Error error) { … }
std::unique_ptr<ComponentUpdateService> TestComponentUpdateServiceFactory(
scoped_refptr<Configurator> config) { … }
ComponentUpdaterTest::ComponentUpdaterTest() { … }
ComponentUpdaterTest::~ComponentUpdaterTest() { … }
void ComponentUpdaterTest::RunThreads() { … }
void ComponentUpdaterTest::RunUpdateTask(
const UpdateScheduler::UserTask& user_task) { … }
void ComponentUpdaterTest::Schedule(
const base::TimeDelta& initial_delay,
const base::TimeDelta& delay,
const UpdateScheduler::UserTask& user_task,
const UpdateScheduler::OnStopTaskCallback& on_stop) { … }
TEST_F(ComponentUpdaterTest, AddObserver) { … }
TEST_F(ComponentUpdaterTest, RemoveObserver) { … }
TEST_F(ComponentUpdaterTest, RegisterComponent) { … }
TEST_F(ComponentUpdaterTest, OnDemandUpdate) { … }
TEST_F(ComponentUpdaterTest, MaybeThrottle) { … }
TEST_F(ComponentUpdaterTest, ComponentDetails) { … }
TEST_F(ComponentUpdaterTest, UpdatesDisabled) { … }
}