Commit d64bf40b authored by Mike Jackson's avatar Mike Jackson Committed by Commit Bot

dpwa: Remove parameterization for Manifest Update Browser Tests

Removes the parameterization for all tests in the
manifest_update_manager_browsertest.cc file, now that
kDesktopPWAsWithoutExtensions flag is always true.

Bug: 1065748
Change-Id: Iff13ff4b394a184fbd5b89b76b15475e017591e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2453378Reviewed-by: default avatarAlan Cutter <alancutter@chromium.org>
Commit-Queue: Mike Jackson <mjackson@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#814551}
parent 3823213a
......@@ -178,21 +178,11 @@ class UpdateCheckResultAwaiter {
} // namespace
class ManifestUpdateManagerBrowserTest
: public InProcessBrowserTest,
public ::testing::WithParamInterface<ProviderType> {
class ManifestUpdateManagerBrowserTest : public InProcessBrowserTest {
public:
ManifestUpdateManagerBrowserTest() {
if (GetParam() == ProviderType::kWebApps) {
scoped_feature_list_.InitWithFeatures(
{features::kDesktopPWAsLocalUpdating,
features::kDesktopPWAsWithoutExtensions},
{});
} else if (GetParam() == ProviderType::kBookmarkApps) {
scoped_feature_list_.InitWithFeatures(
{features::kDesktopPWAsLocalUpdating},
{features::kDesktopPWAsWithoutExtensions});
}
scoped_feature_list_.InitAndEnableFeature(
features::kDesktopPWAsLocalUpdating);
}
ManifestUpdateManagerBrowserTest(const ManifestUpdateManagerBrowserTest&) =
delete;
......@@ -337,10 +327,9 @@ class ManifestUpdateManagerBrowserTest
base::Optional<base::RunLoop> shortcut_run_loop_;
base::Optional<SkColor> updated_shortcut_top_left_color_;
};
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckOutOfScopeNavigation) {
EXPECT_EQ(GetResultAfterPageLoad(GetAppURL(), nullptr),
ManifestUpdateResult::kNoAppInScope);
......@@ -353,7 +342,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
histogram_tester_.ExpectTotalCount(kUpdateHistogramName, 0);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest, CheckIsThrottled) {
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest, CheckIsThrottled) {
constexpr base::TimeDelta kDelayBetweenChecks = base::TimeDelta::FromDays(1);
base::Time time_override = base::Time::UnixEpoch();
SetTimeOverride(time_override);
......@@ -388,7 +377,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest, CheckIsThrottled) {
ManifestUpdateResult::kAppUpToDate, 3);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckCancelledByWebContentsDestroyed) {
AppId app_id = InstallWebApp();
GetManifestUpdateManager(browser()).hang_update_checks_for_testing();
......@@ -403,7 +392,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
kUpdateHistogramName, ManifestUpdateResult::kWebContentsDestroyed, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckCancelledByAppUninstalled) {
AppId app_id = InstallWebApp();
GetManifestUpdateManager(browser()).hang_update_checks_for_testing();
......@@ -419,7 +408,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
ManifestUpdateResult::kAppUninstalled, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckIgnoresWhitespaceDifferences) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -441,7 +430,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
ManifestUpdateResult::kAppUpToDate, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckIgnoresNameChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -463,7 +452,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
ManifestUpdateResult::kAppUpToDate, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckIgnoresShortNameChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -487,7 +476,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
ManifestUpdateResult::kAppUpToDate, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckIgnoresStartUrlChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -508,7 +497,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
ManifestUpdateResult::kAppUpToDate, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckIgnoresNoManifestChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -527,7 +516,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
ManifestUpdateResult::kAppUpToDate, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckIgnoresInvalidManifest) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -549,7 +538,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
ManifestUpdateResult::kAppNotEligible, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckIgnoresNonLocalApps) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -573,7 +562,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
histogram_tester_.ExpectTotalCount(kUpdateHistogramName, 0);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckIgnoresPlaceholderApps) {
// Set up app URL to redirect to force placeholder app to install.
const GURL app_url = GetAppURL();
......@@ -614,7 +603,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
kUpdateHistogramName, ManifestUpdateResult::kAppIsPlaceholder, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckFindsThemeColorChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -651,7 +640,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
SkColorSetARGB(0xFF, 0x00, 0xFF, 0x00));
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest, CheckKeepsSameName) {
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest, CheckKeepsSameName) {
constexpr char kManifestTemplate[] = R"(
{
"name": "$1",
......@@ -680,7 +669,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest, CheckKeepsSameName) {
EXPECT_EQ(GetProvider().registrar().GetAppShortName(app_id), "App name 1");
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckFindsIconUrlChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -702,7 +691,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
CheckShortcutInfoUpdated(app_id, kAnotherInstallableIconTopLeftColor);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckUpdatedPolicyAppsNotUninstallable) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -732,7 +721,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
GetProvider().install_finalizer().CanUserUninstallFromSync(app_id));
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckFindsScopeChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -756,7 +745,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
http_server_.GetURL("/"));
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckFindsDisplayChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -780,7 +769,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
DisplayMode::kStandalone);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckFindsDisplayBrowserChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -827,7 +816,7 @@ class ManifestUpdateManagerBrowserTest_DisplayOverride
base::test::ScopedFeatureList scoped_feature_list_;
};
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest_DisplayOverride,
CheckFindsDisplayOverrideChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -860,7 +849,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
EXPECT_EQ(DisplayMode::kMinimalUi, app_display_mode_override[1]);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest_DisplayOverride,
CheckFindsNewDisplayOverride) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -895,7 +884,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
EXPECT_EQ(DisplayMode::kStandalone, app_display_mode_override[1]);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest_DisplayOverride,
CheckFindsDeletedDisplayOverride) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -928,7 +917,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
ASSERT_EQ(0u, app_display_mode_override.size());
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest_DisplayOverride,
CheckFindsInvalidDisplayOverride) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -963,7 +952,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
ASSERT_EQ(0u, app_display_mode_override.size());
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest_DisplayOverride,
CheckIgnoresDisplayOverrideInvalidChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -990,7 +979,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
ManifestUpdateResult::kAppUpToDate, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest_DisplayOverride,
CheckIgnoresDisplayOverrideChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -1017,7 +1006,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest_DisplayOverride,
ManifestUpdateResult::kAppUpToDate, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckFindsIconContentChange) {
constexpr char kManifest[] = R"(
{
......@@ -1062,7 +1051,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
SK_ColorBLUE);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
CheckIgnoresIconDownloadFail) {
constexpr char kManifest[] = R"(
{
......@@ -1156,7 +1145,7 @@ class ManifestUpdateManagerSystemAppBrowserTest
constexpr char
ManifestUpdateManagerSystemAppBrowserTest::kSystemAppManifestText[];
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerSystemAppBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerSystemAppBrowserTest,
CheckUpdateSkipped) {
system_app_->SetManifest(base::ReplaceStringPlaceholders(
kSystemAppManifestText, {"#f00"}, nullptr));
......@@ -1173,7 +1162,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerSystemAppBrowserTest,
using ManifestUpdateManagerWebAppsBrowserTest =
ManifestUpdateManagerBrowserTest;
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerWebAppsBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerWebAppsBrowserTest,
CheckFindsThemeColorChangeForShadowBookmarkApp) {
auto* extensions_registry =
extensions::ExtensionRegistry::Get(browser()->profile());
......@@ -1218,7 +1207,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerWebAppsBrowserTest,
SK_ColorRED);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerWebAppsBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerWebAppsBrowserTest,
CheckFindsAddedShareTarget) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -1262,7 +1251,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerWebAppsBrowserTest,
EXPECT_EQ(web_app->share_target()->method, apps::ShareTarget::Method::kGet);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerWebAppsBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerWebAppsBrowserTest,
CheckFindsShareTargetChange) {
constexpr char kShareTargetManifestTemplate[] = R"(
{
......@@ -1296,7 +1285,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerWebAppsBrowserTest,
EXPECT_EQ(web_app->share_target()->method, apps::ShareTarget::Method::kPost);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerWebAppsBrowserTest,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerWebAppsBrowserTest,
CheckFindsDeletedShareTarget) {
constexpr char kShareTargetManifestTemplate[] = R"(
{
......@@ -1351,7 +1340,7 @@ class ManifestUpdateManagerBrowserTestWithShortcutsMenu
base::test::ScopedFeatureList scoped_feature_list_;
};
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
CheckFindsShortcutsMenuUpdated) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -1376,7 +1365,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
2u);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
CheckFindsItemNameUpdated) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -1416,7 +1405,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
base::UTF8ToUTF16(kAnotherShortcutsItemName));
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
CheckIgnoresShortNameAndDescriptionChange) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -1454,7 +1443,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
ManifestUpdateResult::kAppUpToDate, 1);
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
CheckFindsItemUrlUpdated) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -1494,7 +1483,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
http_server_.GetURL(kAnotherShortcutsItemUrl));
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
CheckFindsShortcutIconContentChange) {
constexpr char kManifest[] = R"(
{
......@@ -1555,7 +1544,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
run_loop.Run();
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
CheckFindsShortcutIconSrcUpdated) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -1598,7 +1587,7 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
http_server_.GetURL(kAnotherIconSrc));
}
IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
CheckFindsShortcutIconSizesUpdated) {
constexpr char kManifestTemplate[] = R"(
{
......@@ -1642,33 +1631,4 @@ IN_PROC_BROWSER_TEST_P(ManifestUpdateManagerBrowserTestWithShortcutsMenu,
kAnotherIconSize);
}
INSTANTIATE_TEST_SUITE_P(All,
ManifestUpdateManagerBrowserTest,
::testing::Values(ProviderType::kBookmarkApps,
ProviderType::kWebApps),
ProviderTypeParamToString);
INSTANTIATE_TEST_SUITE_P(All,
ManifestUpdateManagerSystemAppBrowserTest,
::testing::Values(ProviderType::kBookmarkApps,
ProviderType::kWebApps),
ProviderTypeParamToString);
INSTANTIATE_TEST_SUITE_P(All,
ManifestUpdateManagerWebAppsBrowserTest,
::testing::Values(ProviderType::kWebApps),
ProviderTypeParamToString);
INSTANTIATE_TEST_SUITE_P(All,
ManifestUpdateManagerBrowserTestWithShortcutsMenu,
::testing::Values(ProviderType::kBookmarkApps,
ProviderType::kWebApps),
ProviderTypeParamToString);
// DisplayOverride is supported only for the new web apps mode
INSTANTIATE_TEST_SUITE_P(All,
ManifestUpdateManagerBrowserTest_DisplayOverride,
::testing::Values(ProviderType::kWebApps),
ProviderTypeParamToString);
} // namespace web_app
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