#include <cstdlib>
#include <memory>
#include <utility>
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/test_future.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/location_bar/custom_tab_bar_view.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/browser/ui/web_applications/app_browser_controller.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/fake_web_app_ui_manager.h"
#include "chrome/browser/web_applications/test/web_app_icon_test_utils.h"
#include "chrome/browser/web_applications/test/web_app_test_utils.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"
#include "chrome/browser/web_applications/web_app_icon_generator.h"
#include "chrome/browser/web_applications/web_app_install_params.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_registry_update.h"
#include "chrome/browser/web_applications/web_app_sync_bridge.h"
#include "chrome/common/chrome_features.h"
#include "components/services/app_service/public/cpp/app_launch_util.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkColor.h"
namespace web_app {
class FetchManifestAndInstallCommandTest : public WebAppBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest, SuccessInstall) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest, ReparentInTab) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest,
WontReparentFromDevtools) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest, MultipleManifests) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest, MultipleInstalls) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest, InvalidManifest) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest, UserDeclineInstall) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest,
HandleWebContentsDestroyed) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest,
InstallWithFallback) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest,
InstallWithFallbackOverwriteInstalled) { … }
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandTest,
InstallFromOutsideScopeToolbarHasBackButton) { … }
class FetchManifestAndInstallCommandTestWithSVG
: public FetchManifestAndInstallCommandTest,
public ::testing::WithParamInterface<bool> { … };
IN_PROC_BROWSER_TEST_P(FetchManifestAndInstallCommandTestWithSVG,
SuccessInstallSVGIcons) { … }
INSTANTIATE_TEST_SUITE_P(…);
class FetchManifestAndInstallCommandUniversalInstallTest
: public FetchManifestAndInstallCommandTest { … };
IN_PROC_BROWSER_TEST_F(FetchManifestAndInstallCommandUniversalInstallTest,
NoManifest) { … }
}