#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/sync/test/integration/apps_helper.h"
#include "chrome/browser/sync/test/integration/web_apps_sync_test_base.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h"
#include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h"
#include "chrome/browser/web_applications/os_integration/os_integration_manager.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_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_command_scheduler.h"
#include "chrome/browser/web_applications/web_app_install_info.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_registrar.h"
#include "chrome/browser/web_applications/web_app_sync_bridge.h"
#include "chrome/browser/web_applications/web_app_utils.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/sync/base/features.h"
#include "components/sync/service/sync_service_impl.h"
#include "components/webapps/browser/install_result_code.h"
#include "components/webapps/browser/installable/installable_metrics.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/app_sorting.h"
#include "extensions/browser/extension_system.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace web_app {
namespace {
ElementsAreArray;
Not;
std::unique_ptr<KeyedService> CreateFakeWebAppProvider(Profile* profile) { … }
class TwoClientWebAppsBMOSyncTest : public WebAppsSyncTestBase { … };
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest,
DISABLED_SyncDoubleInstallation) { … }
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest,
SyncDoubleInstallationDifferentNames) { … }
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#define MAYBE_SyncDoubleInstallationDifferentUserDisplayMode …
#else
#define MAYBE_SyncDoubleInstallationDifferentUserDisplayMode …
#endif
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest,
MAYBE_SyncDoubleInstallationDifferentUserDisplayMode) { … }
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest, DisplayMode) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_DoubleInstallWithUninstall …
#else
#define MAYBE_DoubleInstallWithUninstall …
#endif
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest,
MAYBE_DoubleInstallWithUninstall) { … }
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest, NotSynced) { … }
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest, NotSyncedThenSynced) { … }
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest,
PolicyAppPersistsUninstalledOnSync) { … }
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest, AppSortingSynced) { … }
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest,
DISABLED_AppSortingFixCollisions) { … }
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
defined(THREAD_SANITIZER)
#define MAYBE_UninstallSynced …
#else
#define MAYBE_UninstallSynced …
#endif
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest, MAYBE_UninstallSynced) { … }
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest, UninstallDoesNotReinstall) { … }
IN_PROC_BROWSER_TEST_F(TwoClientWebAppsBMOSyncTest, NoShortcutsCreatedOnSync) { … }
}
}