chromium/chrome/browser/web_applications/commands/install_from_sync_command_browsertest.cc

// Copyright 2022 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/commands/install_from_sync_command.h"

#include "base/task/sequenced_task_runner.h"
#include "base/test/bind.h"
#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h"
#include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h"
#include "chrome/browser/web_applications/proto/web_app_install_state.pb.h"
#include "chrome/browser/web_applications/test/web_app_icon_test_utils.h"
#include "chrome/browser/web_applications/web_app_command_manager.h"
#include "chrome/browser/web_applications/web_app_helpers.h"
#include "chrome/browser/web_applications/web_app_install_info.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_registrar.h"
#include "chrome/browser/web_applications/web_app_utils.h"
#include "components/services/app_service/public/cpp/icon_info.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_utils.h"
#include "content/public/test/web_contents_observer_test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"

namespace web_app {
namespace {

class InstallFromSyncCommandTest : public WebAppBrowserTestBase {};

IN_PROC_BROWSER_TEST_F(InstallFromSyncCommandTest, SimpleInstall) {}

IN_PROC_BROWSER_TEST_F(InstallFromSyncCommandTest, TwoInstalls) {}

// Note: This test may become flaky if the posted task to shutdown the command
// manager happens after the installation is complete. If this is the case, then
// something must be added to stop the install from sync command from
// completing, perhaps by swapping out a system dependency like the
// WebContentsManager to have the load start but never report 'finished' to the
// command.
IN_PROC_BROWSER_TEST_F(InstallFromSyncCommandTest, AbortInstall) {}

}  // namespace
}  // namespace web_app