Commit d4420cd4 authored by Trent Apted's avatar Trent Apted Committed by Commit Bot

De-dupe SystemWebAppManager[WebAppInfo]BrowserTest

These were slightly different when the duplication happened in r790679,
but they appear to be identical now.

Change-Id: I9e15f8c63084d2d98cf0c03695e87bc9392eb9d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2397980Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805252}
parent 24155a98
......@@ -181,24 +181,6 @@ SystemWebAppManagerBrowserTest::SystemWebAppManagerBrowserTest(
}
}
SystemWebAppManagerWebAppInfoBrowserTest::
SystemWebAppManagerWebAppInfoBrowserTest(bool install_mock)
: SystemWebAppManagerBrowserTestBase(install_mock) {
if (provider_type() == ProviderType::kWebApps) {
scoped_feature_list_.InitAndEnableFeature(
features::kDesktopPWAsWithoutExtensions);
} else if (provider_type() == ProviderType::kBookmarkApps) {
scoped_feature_list_.InitAndDisableFeature(
features::kDesktopPWAsWithoutExtensions);
}
if (install_mock) {
maybe_installation_ =
TestSystemWebAppInstallation::SetUpStandaloneSingleWindowApp(
install_from_web_app_info());
}
}
// Test that System Apps install correctly with a manifest.
IN_PROC_BROWSER_TEST_P(SystemWebAppManagerWebAppInfoBrowserTest, Install) {
WaitForTestSystemAppInstall();
......
......@@ -122,24 +122,7 @@ class SystemWebAppManagerBrowserTest
base::test::ScopedFeatureList scoped_feature_list_;
};
// A class for testing installation directly from a WebApplicationInfo. We can't
// inherit from BrowserTestBase because we're templating on a different type.
class SystemWebAppManagerWebAppInfoBrowserTest
: public SystemWebAppManagerBrowserTestBase,
public ::testing::WithParamInterface<ProviderTypeAndInstallationType> {
public:
explicit SystemWebAppManagerWebAppInfoBrowserTest(bool install_mock = true);
~SystemWebAppManagerWebAppInfoBrowserTest() override = default;
web_app::ProviderType provider_type() const {
return std::get<0>(GetParam());
}
bool install_from_web_app_info() const {
return std::get<1>(GetParam()) == InstallationType::kWebAppInfoInstall;
}
private:
base::test::ScopedFeatureList scoped_feature_list_;
};
using SystemWebAppManagerWebAppInfoBrowserTest = SystemWebAppManagerBrowserTest;
std::string ProviderAndInstallationTypeToString(
const ::testing::TestParamInfo<ProviderTypeAndInstallationType>&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment