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

Desktop PWAs: AppServiceShelfContextMenu tests

AppServiceShelfContextMenuWebAppBrowserTest no longer
relies on ProviderType, as BMO as shipped.

Bug: 1065748
Change-Id: If7ef9a2dfd89644288a5e59686dd5efd01c81ec3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454593
Auto-Submit: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: default avatarGlen Robertson <glenrob@chromium.org>
Reviewed-by: default avatarNancy Wang <nancylingwang@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814659}
parent 1980ae7d
......@@ -8,12 +8,12 @@
#include "base/bind_helpers.h"
#include "base/run_loop.h"
#include "base/test/bind_test_util.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h"
#include "chrome/browser/web_applications/components/web_app_id.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/test/base/in_process_browser_test.h"
......@@ -21,28 +21,14 @@
#include "ui/base/models/simple_menu_model.h"
#include "ui/display/display.h"
using web_app::ProviderType;
class AppServiceShelfContextMenuWebAppBrowserTest
: public InProcessBrowserTest,
public ::testing::WithParamInterface<ProviderType> {
: public InProcessBrowserTest {
public:
AppServiceShelfContextMenuWebAppBrowserTest() = default;
~AppServiceShelfContextMenuWebAppBrowserTest() override = default;
void SetUp() override {
if (GetParam() == ProviderType::kWebApps) {
scoped_feature_list_.InitWithFeatures(
{features::kDesktopPWAsTabStrip,
features::kDesktopPWAsWithoutExtensions},
{});
} else {
DCHECK_EQ(GetParam(), ProviderType::kBookmarkApps);
scoped_feature_list_.InitWithFeatures(
{features::kDesktopPWAsTabStrip},
{features::kDesktopPWAsWithoutExtensions});
}
scoped_feature_list_.InitAndEnableFeature(features::kDesktopPWAsTabStrip);
InProcessBrowserTest::SetUp();
}
......@@ -84,7 +70,7 @@ class AppServiceShelfContextMenuWebAppBrowserTest
base::test::ScopedFeatureList scoped_feature_list_;
};
IN_PROC_BROWSER_TEST_P(AppServiceShelfContextMenuWebAppBrowserTest,
IN_PROC_BROWSER_TEST_F(AppServiceShelfContextMenuWebAppBrowserTest,
WindowCommandCheckedForMinimalUi) {
Profile* profile = browser()->profile();
......@@ -107,7 +93,7 @@ IN_PROC_BROWSER_TEST_P(AppServiceShelfContextMenuWebAppBrowserTest,
menu_section->sub_model->IsItemCheckedAt(menu_section->command_index));
}
IN_PROC_BROWSER_TEST_P(AppServiceShelfContextMenuWebAppBrowserTest,
IN_PROC_BROWSER_TEST_F(AppServiceShelfContextMenuWebAppBrowserTest,
SetOpenInTabbedWindow) {
Profile* profile = browser()->profile();
......@@ -131,9 +117,3 @@ IN_PROC_BROWSER_TEST_P(AppServiceShelfContextMenuWebAppBrowserTest,
Browser* app_browser = web_app::LaunchWebAppBrowser(profile, app_id);
EXPECT_TRUE(app_browser->app_controller()->has_tab_strip());
}
INSTANTIATE_TEST_SUITE_P(All,
AppServiceShelfContextMenuWebAppBrowserTest,
::testing::Values(ProviderType::kBookmarkApps,
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