#include <initializer_list>
#include <map>
#include <optional>
#include <string>
#include <utility>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_refptr.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_future.h"
#include "build/build_config.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/extensions/chrome_test_extension_loader.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/shortcuts/shortcut_icon_generator.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/web_applications/test/web_app_browsertest_util.h"
#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h"
#include "chrome/browser/ui/web_applications/web_app_dialogs.h"
#include "chrome/browser/web_applications/mojom/user_display_mode.mojom-shared.h"
#include "chrome/browser/web_applications/test/web_app_test_observers.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_manager.h"
#include "chrome/browser/web_applications/web_app_icon_generator.h"
#include "chrome/browser/web_applications/web_app_icon_manager.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_sync_bridge.h"
#include "chrome/common/chrome_paths.h"
#include "components/webapps/browser/features.h"
#include "components/webapps/browser/installable/installable_metrics.h"
#include "components/webapps/common/web_app_id.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/common/extension.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/manifest/manifest.mojom-shared.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/skia_util.h"
#include "url/gurl.h"
#if !BUILDFLAG(IS_CHROMEOS)
#include "chrome/common/chrome_features.h"
#endif
namespace {
std::string LoadExtension(Profile* profile, const base::FilePath& path) { … }
}
namespace web_app {
class CreateShortcutBrowserTest : public WebAppBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest,
CreateShortcutForInstallableSite) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_InstallSourceRecorded …
#else
#define MAYBE_InstallSourceRecorded …
#endif
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest, MAYBE_InstallSourceRecorded) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest,
CanInstallOverTabShortcutApp) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest,
CannotInstallOverWindowShortcutApp) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest,
ShouldShowCustomTabBarForExtensionPage) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest, WorksAfterDelayedIFrameLoad) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest,
UseNonPromotableManifestData) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest, IgnoreInvalidManifestData) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest,
DISABLED_CreateShortcutAgainOverwriteUserDisplayMode) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest,
DISABLED_OpenShortcutWindowOnlyOnce) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest, UseHostWhenTitleIsUrl) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest,
InstallableSiteDifferentStartUrl) { … }
IN_PROC_BROWSER_TEST_F(CreateShortcutBrowserTest, InstallOverTabShortcutApp) { … }
}