Commit 726754fd authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

Add param names to WebAppControllerBrowserTest tests

This CL updates WebAppControllerBrowserTest test names to look like
WebAppFileHandlingBrowserTest.PWAsCanReceiveFileLaunchParams/HostedAppController
WebAppFileHandlingBrowserTest.PWAsCanReceiveFileLaunchParams/UnifiedControllerWithBookmarkApp
WebAppFileHandlingBrowserTest.PWAsCanReceiveFileLaunchParams/UnifiedControllerWithWebApp
instead of
WebAppFileHandlingBrowserTest.PWAsCanReceiveFileLaunchParams/0
WebAppFileHandlingBrowserTest.PWAsCanReceiveFileLaunchParams/1
WebAppFileHandlingBrowserTest.PWAsCanReceiveFileLaunchParams/2

Bug: 876576
Change-Id: I0a5cb9f4b51f977304312f07848e34c079e571ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1877504
Auto-Submit: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709090}
parent 77844946
......@@ -683,4 +683,5 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(
web_app::ControllerType::kHostedAppController,
web_app::ControllerType::kUnifiedControllerWithBookmarkApp,
web_app::ControllerType::kUnifiedControllerWithWebApp));
web_app::ControllerType::kUnifiedControllerWithWebApp),
web_app::ControllerTypeParamToString);
......@@ -89,4 +89,5 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(
web_app::ControllerType::kHostedAppController,
web_app::ControllerType::kUnifiedControllerWithBookmarkApp,
web_app::ControllerType::kUnifiedControllerWithWebApp));
web_app::ControllerType::kUnifiedControllerWithWebApp),
web_app::ControllerTypeParamToString);
......@@ -248,6 +248,7 @@ INSTANTIATE_TEST_SUITE_P(
WebAppBadgingBrowserTest,
::testing::Values(ControllerType::kHostedAppController,
ControllerType::kUnifiedControllerWithBookmarkApp,
ControllerType::kUnifiedControllerWithWebApp));
ControllerType::kUnifiedControllerWithWebApp),
web_app::ControllerTypeParamToString);
} // namespace web_app
......@@ -19,6 +19,18 @@
namespace web_app {
std::string ControllerTypeParamToString(
const ::testing::TestParamInfo<web_app::ControllerType>& controller_type) {
switch (controller_type.param) {
case web_app::ControllerType::kHostedAppController:
return "HostedAppController";
case web_app::ControllerType::kUnifiedControllerWithBookmarkApp:
return "UnifiedControllerWithBookmarkApp";
case web_app::ControllerType::kUnifiedControllerWithWebApp:
return "UnifiedControllerWithWebApp";
}
}
WebAppControllerBrowserTestBase::WebAppControllerBrowserTestBase() {
if (GetParam() == ControllerType::kUnifiedControllerWithWebApp) {
scoped_feature_list_.InitWithFeatures(
......
......@@ -30,6 +30,9 @@ enum class ControllerType {
kUnifiedControllerWithWebApp,
};
std::string ControllerTypeParamToString(
const ::testing::TestParamInfo<web_app::ControllerType>& controller_type);
// Base class for tests of user interface support for web applications.
// ControllerType selects between use of WebAppBrowserController and
// HostedAppBrowserController.
......
......@@ -488,12 +488,14 @@ INSTANTIATE_TEST_SUITE_P(
WebAppEngagementBrowserTest,
::testing::Values(ControllerType::kHostedAppController,
ControllerType::kUnifiedControllerWithBookmarkApp,
ControllerType::kUnifiedControllerWithWebApp));
ControllerType::kUnifiedControllerWithWebApp),
web_app::ControllerTypeParamToString);
INSTANTIATE_TEST_SUITE_P(
/* no prefix */,
HostedAppEngagementBrowserTest,
::testing::Values(ControllerType::kHostedAppController,
ControllerType::kUnifiedControllerWithBookmarkApp));
ControllerType::kUnifiedControllerWithBookmarkApp),
web_app::ControllerTypeParamToString);
} // namespace web_app
......@@ -116,4 +116,5 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(
web_app::ControllerType::kHostedAppController,
web_app::ControllerType::kUnifiedControllerWithBookmarkApp,
web_app::ControllerType::kUnifiedControllerWithWebApp));
web_app::ControllerType::kUnifiedControllerWithWebApp),
web_app::ControllerTypeParamToString);
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