#include "chrome/browser/web_applications/isolated_web_apps/check_isolated_web_app_bundle_installability_command.h"
#include <memory>
#include <optional>
#include <string>
#include "base/files/file_util.h"
#include "base/test/gmock_expected_support.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_future.h"
#include "base/types/expected.h"
#include "base/version.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_source.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_storage_location.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h"
#include "chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.h"
#include "chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.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.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"
#include "chrome/common/chrome_features.h"
#include "content/public/common/content_features.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace web_app {
namespace {
HasValue;
class CheckIsolatedWebAppBundleInstallabilityCommandTest : public WebAppTest { … };
TEST_F(CheckIsolatedWebAppBundleInstallabilityCommandTest,
SucceedsWhenAppNotInRegistrar) { … }
TEST_F(CheckIsolatedWebAppBundleInstallabilityCommandTest,
SucceedsWhenInstalledAppLowerVersion) { … }
TEST_F(CheckIsolatedWebAppBundleInstallabilityCommandTest,
FailsWhenInstalledAppSameVersion) { … }
TEST_F(CheckIsolatedWebAppBundleInstallabilityCommandTest,
FailsWhenInstalledAppHigherVersion) { … }
class CheckIsolatedWebAppBundleInstallabilityCommandDevModeTest
: public CheckIsolatedWebAppBundleInstallabilityCommandTest { … };
TEST_F(CheckIsolatedWebAppBundleInstallabilityCommandDevModeTest,
SucceedsWhenInstalledAppLowerVersion) { … }
TEST_F(CheckIsolatedWebAppBundleInstallabilityCommandDevModeTest,
SucceedsWhenInstalledAppSameVersion) { … }
TEST_F(CheckIsolatedWebAppBundleInstallabilityCommandDevModeTest,
FailsWhenInstalledAppHigherVersion) { … }
}
}