Commit 2e61dbf0 authored by Mike Jackson (EDGE)'s avatar Mike Jackson (EDGE) Committed by Commit Bot

dpwa: Re-enable pending_app_manager_impl_unittests in BMO

Converting this to a parameterized test, and enabling to run
in BMO mode now that https://chromium-review.googlesource.com/c/chromium/src/+/2215078
has landed

Bug: 1082854
Change-Id: Ifb8f22adef8b9878e81a80584e5dd61d71f6b5a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2219587
Commit-Queue: Mike Jackson <mjackson@microsoft.com>
Reviewed-by: default avatarAlexey Baskakov <loyso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772568}
parent 9f293d00
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "chrome/browser/web_applications/test/test_web_app_ui_manager.h" #include "chrome/browser/web_applications/test/test_web_app_ui_manager.h"
#include "chrome/browser/web_applications/test/test_web_app_url_loader.h" #include "chrome/browser/web_applications/test/test_web_app_url_loader.h"
#include "chrome/browser/web_applications/test/web_app_registration_waiter.h" #include "chrome/browser/web_applications/test/web_app_registration_waiter.h"
#include "chrome/browser/web_applications/test/web_app_test.h"
#include "chrome/common/chrome_features.h" #include "chrome/common/chrome_features.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile.h"
...@@ -301,11 +302,18 @@ class TestPendingAppManagerImpl : public PendingAppManagerImpl { ...@@ -301,11 +302,18 @@ class TestPendingAppManagerImpl : public PendingAppManagerImpl {
} // namespace } // namespace
class PendingAppManagerImplTest : public ChromeRenderViewHostTestHarness { class PendingAppManagerImplTest
: public ChromeRenderViewHostTestHarness,
public ::testing::WithParamInterface<ProviderType> {
public: public:
PendingAppManagerImplTest() { PendingAppManagerImplTest() {
scoped_feature_list_.InitAndDisableFeature( if (GetParam() == web_app::ProviderType::kWebApps) {
features::kDesktopPWAsWithoutExtensions); scoped_feature_list_.InitAndEnableFeature(
features::kDesktopPWAsWithoutExtensions);
} else if (GetParam() == web_app::ProviderType::kBookmarkApps) {
scoped_feature_list_.InitAndDisableFeature(
features::kDesktopPWAsWithoutExtensions);
}
} }
~PendingAppManagerImplTest() override = default; ~PendingAppManagerImplTest() override = default;
...@@ -459,7 +467,7 @@ class PendingAppManagerImplTest : public ChromeRenderViewHostTestHarness { ...@@ -459,7 +467,7 @@ class PendingAppManagerImplTest : public ChromeRenderViewHostTestHarness {
DISALLOW_COPY_AND_ASSIGN(PendingAppManagerImplTest); DISALLOW_COPY_AND_ASSIGN(PendingAppManagerImplTest);
}; };
TEST_F(PendingAppManagerImplTest, Install_Succeeds) { TEST_P(PendingAppManagerImplTest, Install_Succeeds) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
pending_app_manager_impl()->SetNextInstallationLaunchURL(FooWebAppUrl(), pending_app_manager_impl()->SetNextInstallationLaunchURL(FooWebAppUrl(),
...@@ -483,7 +491,7 @@ TEST_F(PendingAppManagerImplTest, Install_Succeeds) { ...@@ -483,7 +491,7 @@ TEST_F(PendingAppManagerImplTest, Install_Succeeds) {
EXPECT_EQ(FooLaunchUrl(), last_registered_launch_url()); EXPECT_EQ(FooLaunchUrl(), last_registered_launch_url());
} }
TEST_F(PendingAppManagerImplTest, Install_SerialCallsDifferentApps) { TEST_P(PendingAppManagerImplTest, Install_SerialCallsDifferentApps) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
pending_app_manager_impl()->SetNextInstallationLaunchURL(FooWebAppUrl(), pending_app_manager_impl()->SetNextInstallationLaunchURL(FooWebAppUrl(),
...@@ -535,7 +543,7 @@ TEST_F(PendingAppManagerImplTest, Install_SerialCallsDifferentApps) { ...@@ -535,7 +543,7 @@ TEST_F(PendingAppManagerImplTest, Install_SerialCallsDifferentApps) {
EXPECT_EQ(BarLaunchUrl(), last_registered_launch_url()); EXPECT_EQ(BarLaunchUrl(), last_registered_launch_url());
} }
TEST_F(PendingAppManagerImplTest, Install_ConcurrentCallsDifferentApps) { TEST_P(PendingAppManagerImplTest, Install_ConcurrentCallsDifferentApps) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
BarWebAppUrl(), InstallResultCode::kSuccessNewInstall); BarWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(BarWebAppUrl(), url_loader()->SetNextLoadUrlResult(BarWebAppUrl(),
...@@ -574,7 +582,7 @@ TEST_F(PendingAppManagerImplTest, Install_ConcurrentCallsDifferentApps) { ...@@ -574,7 +582,7 @@ TEST_F(PendingAppManagerImplTest, Install_ConcurrentCallsDifferentApps) {
run_loop.Run(); run_loop.Run();
} }
TEST_F(PendingAppManagerImplTest, Install_PendingSuccessfulTask) { TEST_P(PendingAppManagerImplTest, Install_PendingSuccessfulTask) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -624,7 +632,7 @@ TEST_F(PendingAppManagerImplTest, Install_PendingSuccessfulTask) { ...@@ -624,7 +632,7 @@ TEST_F(PendingAppManagerImplTest, Install_PendingSuccessfulTask) {
bar_run_loop.Run(); bar_run_loop.Run();
} }
TEST_F(PendingAppManagerImplTest, Install_PendingFailingTask) { TEST_P(PendingAppManagerImplTest, Install_PendingFailingTask) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kWebAppDisabled); FooWebAppUrl(), InstallResultCode::kWebAppDisabled);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -673,7 +681,7 @@ TEST_F(PendingAppManagerImplTest, Install_PendingFailingTask) { ...@@ -673,7 +681,7 @@ TEST_F(PendingAppManagerImplTest, Install_PendingFailingTask) {
bar_run_loop.Run(); bar_run_loop.Run();
} }
TEST_F(PendingAppManagerImplTest, Install_ReentrantCallback) { TEST_P(PendingAppManagerImplTest, Install_ReentrantCallback) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -711,7 +719,7 @@ TEST_F(PendingAppManagerImplTest, Install_ReentrantCallback) { ...@@ -711,7 +719,7 @@ TEST_F(PendingAppManagerImplTest, Install_ReentrantCallback) {
run_loop.Run(); run_loop.Run();
} }
TEST_F(PendingAppManagerImplTest, Install_SerialCallsSameApp) { TEST_P(PendingAppManagerImplTest, Install_SerialCallsSameApp) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -744,7 +752,7 @@ TEST_F(PendingAppManagerImplTest, Install_SerialCallsSameApp) { ...@@ -744,7 +752,7 @@ TEST_F(PendingAppManagerImplTest, Install_SerialCallsSameApp) {
} }
} }
TEST_F(PendingAppManagerImplTest, Install_ConcurrentCallsSameApp) { TEST_P(PendingAppManagerImplTest, Install_ConcurrentCallsSameApp) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -786,7 +794,7 @@ TEST_F(PendingAppManagerImplTest, Install_ConcurrentCallsSameApp) { ...@@ -786,7 +794,7 @@ TEST_F(PendingAppManagerImplTest, Install_ConcurrentCallsSameApp) {
EXPECT_EQ(GetFooInstallOptions(), last_install_options()); EXPECT_EQ(GetFooInstallOptions(), last_install_options());
} }
TEST_F(PendingAppManagerImplTest, Install_AlwaysUpdate) { TEST_P(PendingAppManagerImplTest, Install_AlwaysUpdate) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -831,7 +839,7 @@ TEST_F(PendingAppManagerImplTest, Install_AlwaysUpdate) { ...@@ -831,7 +839,7 @@ TEST_F(PendingAppManagerImplTest, Install_AlwaysUpdate) {
} }
} }
TEST_F(PendingAppManagerImplTest, Install_InstallationFails) { TEST_P(PendingAppManagerImplTest, Install_InstallationFails) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kWebAppDisabled); FooWebAppUrl(), InstallResultCode::kWebAppDisabled);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -848,7 +856,7 @@ TEST_F(PendingAppManagerImplTest, Install_InstallationFails) { ...@@ -848,7 +856,7 @@ TEST_F(PendingAppManagerImplTest, Install_InstallationFails) {
EXPECT_EQ(1u, install_run_count()); EXPECT_EQ(1u, install_run_count());
} }
TEST_F(PendingAppManagerImplTest, Install_PlaceholderApp) { TEST_P(PendingAppManagerImplTest, Install_PlaceholderApp) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult( url_loader()->SetNextLoadUrlResult(
...@@ -869,7 +877,7 @@ TEST_F(PendingAppManagerImplTest, Install_PlaceholderApp) { ...@@ -869,7 +877,7 @@ TEST_F(PendingAppManagerImplTest, Install_PlaceholderApp) {
EXPECT_EQ(install_options, last_install_options()); EXPECT_EQ(install_options, last_install_options());
} }
TEST_F(PendingAppManagerImplTest, InstallApps_Succeeds) { TEST_P(PendingAppManagerImplTest, InstallApps_Succeeds) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -889,7 +897,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_Succeeds) { ...@@ -889,7 +897,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_Succeeds) {
EXPECT_EQ(GetFooInstallOptions(), last_install_options()); EXPECT_EQ(GetFooInstallOptions(), last_install_options());
} }
TEST_F(PendingAppManagerImplTest, InstallApps_FailsInstallationFails) { TEST_P(PendingAppManagerImplTest, InstallApps_FailsInstallationFails) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kWebAppDisabled); FooWebAppUrl(), InstallResultCode::kWebAppDisabled);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -908,7 +916,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_FailsInstallationFails) { ...@@ -908,7 +916,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_FailsInstallationFails) {
EXPECT_EQ(1u, install_run_count()); EXPECT_EQ(1u, install_run_count());
} }
TEST_F(PendingAppManagerImplTest, InstallApps_PlaceholderApp) { TEST_P(PendingAppManagerImplTest, InstallApps_PlaceholderApp) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult( url_loader()->SetNextLoadUrlResult(
...@@ -930,7 +938,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_PlaceholderApp) { ...@@ -930,7 +938,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_PlaceholderApp) {
EXPECT_EQ(install_options, last_install_options()); EXPECT_EQ(install_options, last_install_options());
} }
TEST_F(PendingAppManagerImplTest, InstallApps_Multiple) { TEST_P(PendingAppManagerImplTest, InstallApps_Multiple) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -956,7 +964,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_Multiple) { ...@@ -956,7 +964,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_Multiple) {
EXPECT_EQ(GetBarInstallOptions(), last_install_options()); EXPECT_EQ(GetBarInstallOptions(), last_install_options());
} }
TEST_F(PendingAppManagerImplTest, InstallApps_PendingInstallApps) { TEST_P(PendingAppManagerImplTest, InstallApps_PendingInstallApps) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -1003,7 +1011,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_PendingInstallApps) { ...@@ -1003,7 +1011,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_PendingInstallApps) {
run_loop.Run(); run_loop.Run();
} }
TEST_F(PendingAppManagerImplTest, Install_PendingMultipleInstallApps) { TEST_P(PendingAppManagerImplTest, Install_PendingMultipleInstallApps) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
pending_app_manager_impl()->SetNextInstallationLaunchURL(FooWebAppUrl(), pending_app_manager_impl()->SetNextInstallationLaunchURL(FooWebAppUrl(),
...@@ -1072,7 +1080,7 @@ TEST_F(PendingAppManagerImplTest, Install_PendingMultipleInstallApps) { ...@@ -1072,7 +1080,7 @@ TEST_F(PendingAppManagerImplTest, Install_PendingMultipleInstallApps) {
EXPECT_EQ(BarLaunchUrl(), last_registered_launch_url()); EXPECT_EQ(BarLaunchUrl(), last_registered_launch_url());
} }
TEST_F(PendingAppManagerImplTest, InstallApps_PendingInstall) { TEST_P(PendingAppManagerImplTest, InstallApps_PendingInstall) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -1135,7 +1143,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_PendingInstall) { ...@@ -1135,7 +1143,7 @@ TEST_F(PendingAppManagerImplTest, InstallApps_PendingInstall) {
run_loop.Run(); run_loop.Run();
} }
TEST_F(PendingAppManagerImplTest, AppUninstalled) { TEST_P(PendingAppManagerImplTest, AppUninstalled) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -1172,7 +1180,7 @@ TEST_F(PendingAppManagerImplTest, AppUninstalled) { ...@@ -1172,7 +1180,7 @@ TEST_F(PendingAppManagerImplTest, AppUninstalled) {
} }
} }
TEST_F(PendingAppManagerImplTest, ExternalAppUninstalled) { TEST_P(PendingAppManagerImplTest, ExternalAppUninstalled) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -1227,7 +1235,7 @@ TEST_F(PendingAppManagerImplTest, ExternalAppUninstalled) { ...@@ -1227,7 +1235,7 @@ TEST_F(PendingAppManagerImplTest, ExternalAppUninstalled) {
} }
} }
TEST_F(PendingAppManagerImplTest, UninstallApps_Succeeds) { TEST_P(PendingAppManagerImplTest, UninstallApps_Succeeds) {
registrar()->AddExternalApp( registrar()->AddExternalApp(
GenerateFakeAppId(FooWebAppUrl()), GenerateFakeAppId(FooWebAppUrl()),
{FooWebAppUrl(), ExternalInstallSource::kExternalPolicy}); {FooWebAppUrl(), ExternalInstallSource::kExternalPolicy});
...@@ -1244,7 +1252,7 @@ TEST_F(PendingAppManagerImplTest, UninstallApps_Succeeds) { ...@@ -1244,7 +1252,7 @@ TEST_F(PendingAppManagerImplTest, UninstallApps_Succeeds) {
EXPECT_EQ(FooWebAppUrl(), last_uninstalled_app_url()); EXPECT_EQ(FooWebAppUrl(), last_uninstalled_app_url());
} }
TEST_F(PendingAppManagerImplTest, UninstallApps_Fails) { TEST_P(PendingAppManagerImplTest, UninstallApps_Fails) {
install_finalizer()->SetNextUninstallExternalWebAppResult(FooWebAppUrl(), install_finalizer()->SetNextUninstallExternalWebAppResult(FooWebAppUrl(),
false); false);
UninstallAppsResults results = UninstallAppsAndWait( UninstallAppsResults results = UninstallAppsAndWait(
...@@ -1256,7 +1264,7 @@ TEST_F(PendingAppManagerImplTest, UninstallApps_Fails) { ...@@ -1256,7 +1264,7 @@ TEST_F(PendingAppManagerImplTest, UninstallApps_Fails) {
EXPECT_EQ(FooWebAppUrl(), last_uninstalled_app_url()); EXPECT_EQ(FooWebAppUrl(), last_uninstalled_app_url());
} }
TEST_F(PendingAppManagerImplTest, UninstallApps_Multiple) { TEST_P(PendingAppManagerImplTest, UninstallApps_Multiple) {
registrar()->AddExternalApp( registrar()->AddExternalApp(
GenerateFakeAppId(FooWebAppUrl()), GenerateFakeAppId(FooWebAppUrl()),
{FooWebAppUrl(), ExternalInstallSource::kExternalPolicy}); {FooWebAppUrl(), ExternalInstallSource::kExternalPolicy});
...@@ -1279,7 +1287,7 @@ TEST_F(PendingAppManagerImplTest, UninstallApps_Multiple) { ...@@ -1279,7 +1287,7 @@ TEST_F(PendingAppManagerImplTest, UninstallApps_Multiple) {
uninstalled_app_urls()); uninstalled_app_urls());
} }
TEST_F(PendingAppManagerImplTest, UninstallApps_PendingInstall) { TEST_P(PendingAppManagerImplTest, UninstallApps_PendingInstall) {
pending_app_manager_impl()->SetNextInstallationTaskResult( pending_app_manager_impl()->SetNextInstallationTaskResult(
FooWebAppUrl(), InstallResultCode::kSuccessNewInstall); FooWebAppUrl(), InstallResultCode::kSuccessNewInstall);
url_loader()->SetNextLoadUrlResult(FooWebAppUrl(), url_loader()->SetNextLoadUrlResult(FooWebAppUrl(),
...@@ -1305,7 +1313,7 @@ TEST_F(PendingAppManagerImplTest, UninstallApps_PendingInstall) { ...@@ -1305,7 +1313,7 @@ TEST_F(PendingAppManagerImplTest, UninstallApps_PendingInstall) {
run_loop.Run(); run_loop.Run();
} }
TEST_F(PendingAppManagerImplTest, ReinstallPlaceholderApp_Success) { TEST_P(PendingAppManagerImplTest, ReinstallPlaceholderApp_Success) {
// Install a placeholder app // Install a placeholder app
auto install_options = GetFooInstallOptions(); auto install_options = GetFooInstallOptions();
install_options.install_placeholder = true; install_options.install_placeholder = true;
...@@ -1345,7 +1353,7 @@ TEST_F(PendingAppManagerImplTest, ReinstallPlaceholderApp_Success) { ...@@ -1345,7 +1353,7 @@ TEST_F(PendingAppManagerImplTest, ReinstallPlaceholderApp_Success) {
} }
} }
TEST_F(PendingAppManagerImplTest, TEST_P(PendingAppManagerImplTest,
ReinstallPlaceholderApp_ReinstallNotPossible) { ReinstallPlaceholderApp_ReinstallNotPossible) {
// Install a placeholder app // Install a placeholder app
auto install_options = GetFooInstallOptions(); auto install_options = GetFooInstallOptions();
...@@ -1387,7 +1395,7 @@ TEST_F(PendingAppManagerImplTest, ...@@ -1387,7 +1395,7 @@ TEST_F(PendingAppManagerImplTest,
} }
} }
TEST_F(PendingAppManagerImplTest, TEST_P(PendingAppManagerImplTest,
ReinstallPlaceholderAppWhenUnused_NoOpenedWindows) { ReinstallPlaceholderAppWhenUnused_NoOpenedWindows) {
// Install a placeholder app // Install a placeholder app
auto install_options = GetFooInstallOptions(); auto install_options = GetFooInstallOptions();
...@@ -1428,7 +1436,7 @@ TEST_F(PendingAppManagerImplTest, ...@@ -1428,7 +1436,7 @@ TEST_F(PendingAppManagerImplTest,
} }
} }
TEST_F(PendingAppManagerImplTest, TEST_P(PendingAppManagerImplTest,
ReinstallPlaceholderAppWhenUnused_OneWindowOpened) { ReinstallPlaceholderAppWhenUnused_OneWindowOpened) {
// Install a placeholder app // Install a placeholder app
auto install_options = GetFooInstallOptions(); auto install_options = GetFooInstallOptions();
...@@ -1471,7 +1479,7 @@ TEST_F(PendingAppManagerImplTest, ...@@ -1471,7 +1479,7 @@ TEST_F(PendingAppManagerImplTest,
} }
} }
TEST_F(PendingAppManagerImplTest, DoNotRegisterServiceWorkerForLocalApps) { TEST_P(PendingAppManagerImplTest, DoNotRegisterServiceWorkerForLocalApps) {
GURL local_urls[] = {GURL("chrome://sample"), GURL local_urls[] = {GURL("chrome://sample"),
GURL("chrome-untrusted://sample")}; GURL("chrome-untrusted://sample")};
...@@ -1498,4 +1506,10 @@ TEST_F(PendingAppManagerImplTest, DoNotRegisterServiceWorkerForLocalApps) { ...@@ -1498,4 +1506,10 @@ TEST_F(PendingAppManagerImplTest, DoNotRegisterServiceWorkerForLocalApps) {
} }
} }
INSTANTIATE_TEST_SUITE_P(All,
PendingAppManagerImplTest,
::testing::Values(ProviderType::kBookmarkApps,
ProviderType::kWebApps),
ProviderTypeParamToString);
} // namespace web_app } // 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