#include "chrome/browser/web_applications/externally_managed_app_manager.h"
#include <algorithm>
#include <iterator>
#include <optional>
#include <sstream>
#include <vector>
#include "base/containers/contains.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/test_future.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/apps/app_service/publishers/app_publisher.h"
#include "chrome/browser/web_applications/external_install_options.h"
#include "chrome/browser/web_applications/externally_managed_app_manager.h"
#include "chrome/browser/web_applications/mojom/user_display_mode.mojom-shared.h"
#include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h"
#include "chrome/browser/web_applications/policy/web_app_policy_manager.h"
#include "chrome/browser/web_applications/test/fake_externally_managed_app_manager.h"
#include "chrome/browser/web_applications/test/fake_web_app_provider.h"
#include "chrome/browser/web_applications/test/fake_web_contents_manager.h"
#include "chrome/browser/web_applications/test/web_app_install_test_utils.h"
#include "chrome/browser/web_applications/test/web_app_test.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_constants.h"
#include "chrome/browser/web_applications/web_app_helpers.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_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_types.h"
#include "components/webapps/browser/install_result_code.h"
#include "components/webapps/browser/web_contents/web_app_url_loader.h"
#include "components/webapps/common/web_page_metadata.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/manifest/display_mode.mojom-shared.h"
#include "third_party/blink/public/mojom/manifest/manifest.mojom-forward.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace web_app {
class ExternallyManagedAppManagerTest : public WebAppTest { … };
TEST_F(ExternallyManagedAppManagerTest, DestroyDuringInstallInSynchronize) { … }
TEST_F(ExternallyManagedAppManagerTest, DestroyDuringUninstallInSynchronize) { … }
TEST_F(ExternallyManagedAppManagerTest, SynchronizeInstalledApps) { … }
namespace {
ElementsAre;
Eq;
IsEmpty;
UnorderedElementsAre;
class ExternallyAppManagerTest : public WebAppTest { … };
TEST_F(ExternallyAppManagerTest, NoNetworkNoPlaceholder) { … }
TEST_F(ExternallyAppManagerTest, SimpleInstall) { … }
TEST_F(ExternallyAppManagerTest, TwoInstallUrlsSameApp) { … }
TEST_F(ExternallyAppManagerTest, RemovingInstallUrlsFromSource) { … }
TEST_F(ExternallyAppManagerTest, InstallUrlChanges) { … }
TEST_F(ExternallyAppManagerTest, PolicyAppOverridesUserInstalledApp) { … }
TEST_F(ExternallyAppManagerTest, NoNetworkWithPlaceholder) { … }
TEST_F(ExternallyAppManagerTest, RedirectInstallUrlPlaceholder) { … }
TEST_F(ExternallyAppManagerTest, PlaceholderResolvedFromSynchronize) { … }
TEST_F(ExternallyAppManagerTest, PlaceholderResolvedFromInstallNow) { … }
TEST_F(ExternallyAppManagerTest, TwoAppsSameInstallUrlSameSourceInstallNow) { … }
TEST_F(ExternallyAppManagerTest, TwoAppsSameInstallUrlTwoSourcesInstallNow) { … }
TEST_F(ExternallyAppManagerTest, TwoAppsSameInstallUrlTwoSourcesSynchronize) { … }
TEST_F(ExternallyAppManagerTest, PlaceholderFixedBySecondInstallUrlInstallNow) { … }
TEST_F(ExternallyAppManagerTest,
PlaceholderFixedBySecondInstallUrlSynchronize) { … }
TEST_F(ExternallyAppManagerTest, PlaceholderFullInstallConflictCanUpdate) { … }
}
}