#include <iostream>
#include <map>
#include <optional>
#include <string>
#include <utility>
#include "base/at_exit.h"
#include "base/check.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/task_environment.h"
#include "base/test/test_suite.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "base/version.h"
#include "build/build_config.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/updater/app/app.h"
#include "chrome/updater/constants.h"
#include "chrome/updater/ipc/ipc_support.h"
#include "chrome/updater/test/integration_tests_impl.h"
#include "chrome/updater/test/unit_test_util.h"
#include "chrome/updater/updater_scope.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#if BUILDFLAG(IS_WIN)
#include "base/win/scoped_com_initializer.h"
#include "chrome/updater/util/win_util.h"
#endif
namespace updater::test {
namespace {
EmptyTestEventListener;
Test;
TestEventListeners;
TestInfo;
TestPartResult;
UnitTest;
constexpr int kSuccess = …;
constexpr int kUnknownSwitch = …;
constexpr int kBadCommand = …;
base::Value ValueFromString(const std::string& values) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(const std::string&, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(bool, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(int, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(const GURL&, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(const base::FilePath&, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(const base::Version&, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(const base::Time&, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(const base::TimeDelta&, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(const base::Value::Dict&, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(const base::Value::List&, Args...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSwitch(
const std::string& flag,
base::RepeatingCallback<bool(AppBundleWebCreateMode, Args...)> callback) { … }
template <typename Arg, typename... RemainingArgs>
base::RepeatingCallback<bool(RemainingArgs...)> WithArg(
Arg arg,
base::RepeatingCallback<bool(Arg, RemainingArgs...)> callback) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args..., base::OnceCallback<void(int)>)>
WithShutdown(base::RepeatingCallback<int(Args...)> callback) { … }
template <typename... Args, typename... ProvidedArgs>
base::RepeatingCallback<bool(Args..., base::OnceCallback<void(int)>)> Wrap(
int (*func)(Args...),
ProvidedArgs... provided_args) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args..., base::OnceCallback<void(int)>)> Wrap(
void (*func)(Args...)) { … }
template <typename... Args>
base::RepeatingCallback<bool(Args...)> WithSystemScope(
base::RepeatingCallback<bool(UpdaterScope, Args...)> callback) { … }
class AppTestHelper : public App { … };
void AppTestHelper::FirstTaskRun() { … }
scoped_refptr<App> MakeAppTestHelper() { … }
class TersePrinter : public EmptyTestEventListener { … };
int IntegrationTestsHelperMain(int argc, char** argv) { … }
TEST(TestHelperCommandRunner, Run) { … }
}
}
int main(int argc, char** argv) { … }