Commit bc55ba0c authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

AppServiceAppWindowWebAppBrowserTest cleanup

DesktopPWAsWithoutExtensions has shipped. The test
no longer needs to be parameterized.

Bug: 1065748
Change-Id: I451f0252cc0785b7f553a13e120c264ddd07ab7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454439
Auto-Submit: Eric Willigers <ericwilligers@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Reviewed-by: default avatarNancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814652}
parent ee02ed73
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h"
#include "chrome/browser/web_applications/test/web_app_test.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/web_application_info.h" #include "chrome/common/web_application_info.h"
#include "chromeos/constants/chromeos_features.h" #include "chromeos/constants/chromeos_features.h"
#include "components/arc/arc_service_manager.h" #include "components/arc/arc_service_manager.h"
...@@ -353,18 +351,9 @@ IN_PROC_BROWSER_TEST_F(AppServiceAppWindowLacrosBrowserTest, LacrosWindow) { ...@@ -353,18 +351,9 @@ IN_PROC_BROWSER_TEST_F(AppServiceAppWindowLacrosBrowserTest, LacrosWindow) {
} }
class AppServiceAppWindowWebAppBrowserTest class AppServiceAppWindowWebAppBrowserTest
: public AppServiceAppWindowBrowserTest, : public AppServiceAppWindowBrowserTest {
public ::testing::WithParamInterface<web_app::ProviderType> {
protected: protected:
AppServiceAppWindowWebAppBrowserTest() { AppServiceAppWindowWebAppBrowserTest() = default;
if (GetParam() == web_app::ProviderType::kWebApps) {
scoped_feature_list_.InitAndEnableFeature(
features::kDesktopPWAsWithoutExtensions);
} else {
scoped_feature_list_.InitAndDisableFeature(
features::kDesktopPWAsWithoutExtensions);
}
}
~AppServiceAppWindowWebAppBrowserTest() override = default; ~AppServiceAppWindowWebAppBrowserTest() override = default;
// AppServiceAppWindowBrowserTest: // AppServiceAppWindowBrowserTest:
...@@ -402,12 +391,10 @@ class AppServiceAppWindowWebAppBrowserTest ...@@ -402,12 +391,10 @@ class AppServiceAppWindowWebAppBrowserTest
private: private:
// For mocking a secure site. // For mocking a secure site.
net::EmbeddedTestServer https_server_; net::EmbeddedTestServer https_server_;
base::test::ScopedFeatureList scoped_feature_list_;
}; };
// Test that we have the correct instance for Web apps. // Test that we have the correct instance for Web apps.
IN_PROC_BROWSER_TEST_P(AppServiceAppWindowWebAppBrowserTest, WebAppsWindow) { IN_PROC_BROWSER_TEST_F(AppServiceAppWindowWebAppBrowserTest, WebAppsWindow) {
std::string app_id = CreateWebApp(); std::string app_id = CreateWebApp();
auto windows = app_service_proxy_->InstanceRegistry().GetWindows(app_id); auto windows = app_service_proxy_->InstanceRegistry().GetWindows(app_id);
...@@ -438,7 +425,7 @@ IN_PROC_BROWSER_TEST_P(AppServiceAppWindowWebAppBrowserTest, WebAppsWindow) { ...@@ -438,7 +425,7 @@ IN_PROC_BROWSER_TEST_P(AppServiceAppWindowWebAppBrowserTest, WebAppsWindow) {
// Tests that web app with multiple open windows can be activated from the app // Tests that web app with multiple open windows can be activated from the app
// list. // list.
IN_PROC_BROWSER_TEST_P(AppServiceAppWindowWebAppBrowserTest, IN_PROC_BROWSER_TEST_F(AppServiceAppWindowWebAppBrowserTest,
LaunchFromAppList) { LaunchFromAppList) {
std::string app_id = CreateWebApp(); std::string app_id = CreateWebApp();
...@@ -727,9 +714,3 @@ IN_PROC_BROWSER_TEST_F(AppServiceAppWindowArcAppBrowserTest, LogicalWindowId) { ...@@ -727,9 +714,3 @@ IN_PROC_BROWSER_TEST_F(AppServiceAppWindowArcAppBrowserTest, LogicalWindowId) {
windows = app_service_proxy_->InstanceRegistry().GetWindows(app_id); windows = app_service_proxy_->InstanceRegistry().GetWindows(app_id);
EXPECT_EQ(0u, windows.size()); EXPECT_EQ(0u, windows.size());
} }
INSTANTIATE_TEST_SUITE_P(All,
AppServiceAppWindowWebAppBrowserTest,
::testing::Values(web_app::ProviderType::kBookmarkApps,
web_app::ProviderType::kWebApps),
web_app::ProviderTypeParamToString);
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