chromium/chrome/browser/web_applications/extensions/web_app_uninstall_and_replace_job_unittest.cc

// Copyright 2023 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/web_applications/jobs/uninstall/web_app_uninstall_and_replace_job.h"

#include <memory>
#include <optional>

#include "base/containers/flat_set.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/test/bind.h"
#include "base/test/test_future.h"
#include "chrome/browser/web_applications/commands/web_app_command.h"
#include "chrome/browser/web_applications/locks/app_lock.h"
#include "chrome/browser/web_applications/test/fake_os_integration_manager.h"
#include "chrome/browser/web_applications/test/fake_web_app_provider.h"
#include "chrome/browser/web_applications/test/web_app_install_test_utils.h"
#include "chrome/browser/web_applications/test/web_app_test.h"
#include "chrome/browser/web_applications/test/web_app_test_observers.h"
#include "chrome/browser/web_applications/web_app_command_manager.h"
#include "components/webapps/common/web_app_id.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace web_app {

class TestUninstallAndReplaceJobCommand
    : public WebAppCommand<AppLock, bool /*uninstall_triggered*/> {};

class WebAppUninstallAndReplaceJobTest : public WebAppTest {};

// `WebAppUninstallAndReplaceJob` uses `AppServiceProxy` to do uninstall, app
// service only lives on chromeos ash not lacros.
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
// Regression test for crbug.com/1182030
TEST_F(WebAppUninstallAndReplaceJobTest,
       WebAppMigrationPreservesShortcutStates) {}

TEST_F(WebAppUninstallAndReplaceJobTest, DoubleMigration) {}
#endif  // !BUILDFLAG(IS_CHROMEOS_LACROS)

}  // namespace web_app