#include <stddef.h>
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "chrome/browser/extensions/extension_sync_data.h"
#include "chrome/browser/extensions/extension_sync_service.h"
#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/apps_helper.h"
#include "chrome/browser/sync/test/integration/apps_sync_test_base.h"
#include "chrome/browser/sync/test/integration/sync_app_helper.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h"
#include "chrome/browser/web_applications/preinstalled_web_apps/preinstalled_web_apps.h"
#include "chrome/browser/web_applications/web_app_helpers.h"
#include "chrome/browser/web_applications/web_app_install_info.h"
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
#include "components/sync/base/features.h"
#include "components/sync/model/string_ordinal.h"
#include "components/sync/service/sync_service_impl.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_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/test_extension_registry_observer.h"
#include "extensions/common/constants.h"
AllProfilesHaveSameApps;
DisableApp;
EnableApp;
GetAppLaunchOrdinalForApp;
IncognitoDisableApp;
IncognitoEnableApp;
InstallHostedApp;
InstallPlatformApp;
SetAppLaunchOrdinalForApp;
SetPageOrdinalForApp;
UninstallApp;
namespace {
extensions::ExtensionRegistry* GetExtensionRegistry(Profile* profile) { … }
}
class TwoClientExtensionAppsSyncTest : public AppsSyncTestBase { … };
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(StartWithNoApps)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(StartWithSameApps)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, StartWithDifferentApps) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(InstallDifferentApps)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, E2E_ENABLED(Add)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, E2E_ENABLED(Uninstall)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UninstallThenInstall)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, E2E_ONLY(Merge)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateEnableDisableApp)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateIncognitoEnableDisable)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdatePageOrdinal)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateAppLaunchOrdinal)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateCWSOrdinals)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
E2E_ENABLED(UpdateLaunchType)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest, UnexpectedLaunchType) { … }
namespace {
constexpr char kHostedAppId0[] = …;
constexpr char kHostedAppId1[] = …;
}
IN_PROC_BROWSER_TEST_F(TwoClientExtensionAppsSyncTest,
DefaultWebAppMigratedChromeAppSyncBlocked) { … }