Commit 2103c219 authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

WebAppFileHandlerRegistrationLinuxBrowserTest tidy

Desktop PWAs without Extensions (BMO) has shipped.

The test no longer needs to be parameterized.

Bug: 1065748
Change-Id: I410e0eaec8a18e0232155214b29bf22c79bdf07d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2459257
Auto-Submit: Eric Willigers <ericwilligers@chromium.org>
Commit-Queue: Glen Robertson <glenrob@chromium.org>
Reviewed-by: default avatarGlen Robertson <glenrob@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815014}
parent 2dbb7dac
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include "chrome/browser/web_applications/components/externally_installed_web_app_prefs.h" #include "chrome/browser/web_applications/components/externally_installed_web_app_prefs.h"
#include "chrome/browser/web_applications/components/web_app_id.h" #include "chrome/browser/web_applications/components/web_app_id.h"
#include "chrome/browser/web_applications/components/web_app_provider_base.h" #include "chrome/browser/web_applications/components/web_app_provider_base.h"
#include "chrome/browser/web_applications/test/web_app_test.h"
#include "chrome/common/chrome_features.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
#include "components/services/app_service/public/cpp/file_handler.h" #include "components/services/app_service/public/cpp/file_handler.h"
#include "content/public/test/browser_test.h" #include "content/public/test/browser_test.h"
...@@ -52,20 +50,11 @@ apps::FileHandler GetTestFileHandler(const std::string& action, ...@@ -52,20 +50,11 @@ apps::FileHandler GetTestFileHandler(const std::string& action,
} // namespace } // namespace
class WebAppFileHandlerRegistrationLinuxBrowserTest class WebAppFileHandlerRegistrationLinuxBrowserTest
: public InProcessBrowserTest, : public InProcessBrowserTest {
public ::testing::WithParamInterface<ProviderType> {
protected: protected:
WebAppFileHandlerRegistrationLinuxBrowserTest() { WebAppFileHandlerRegistrationLinuxBrowserTest() {
if (GetParam() == ProviderType::kWebApps) { scoped_feature_list_.InitAndEnableFeature(
scoped_feature_list_.InitWithFeatures( blink::features::kFileHandlingAPI);
{blink::features::kFileHandlingAPI,
features::kDesktopPWAsWithoutExtensions},
{});
} else if (GetParam() == ProviderType::kBookmarkApps) {
scoped_feature_list_.InitWithFeatures(
{blink::features::kFileHandlingAPI},
{features::kDesktopPWAsWithoutExtensions});
}
} }
AppRegistrar& registrar() { AppRegistrar& registrar() {
...@@ -84,7 +73,7 @@ class WebAppFileHandlerRegistrationLinuxBrowserTest ...@@ -84,7 +73,7 @@ class WebAppFileHandlerRegistrationLinuxBrowserTest
// Verify that the MIME type registration callback is called and that // Verify that the MIME type registration callback is called and that
// the caller behaves as expected. // the caller behaves as expected.
IN_PROC_BROWSER_TEST_P(WebAppFileHandlerRegistrationLinuxBrowserTest, IN_PROC_BROWSER_TEST_F(WebAppFileHandlerRegistrationLinuxBrowserTest,
RegisterMimeTypesOnLinuxCallbackCalledSuccessfully) { RegisterMimeTypesOnLinuxCallbackCalledSuccessfully) {
ASSERT_TRUE(embedded_test_server()->Start()); ASSERT_TRUE(embedded_test_server()->Start());
GURL url(embedded_test_server()->GetURL( GURL url(embedded_test_server()->GetURL(
...@@ -119,10 +108,4 @@ IN_PROC_BROWSER_TEST_P(WebAppFileHandlerRegistrationLinuxBrowserTest, ...@@ -119,10 +108,4 @@ IN_PROC_BROWSER_TEST_P(WebAppFileHandlerRegistrationLinuxBrowserTest,
ASSERT_TRUE(path_reached); ASSERT_TRUE(path_reached);
} }
INSTANTIATE_TEST_SUITE_P(All,
WebAppFileHandlerRegistrationLinuxBrowserTest,
::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