Commit 4ad524f0 authored by Jarryd's avatar Jarryd Committed by Chromium LUCI CQ

dPWA: Implement testing journeys 149-152.

 * Add three new testing journeys to the test cases input file.
 * Implement |assert_app_in_list_not_windowed| testing action.

Bug: 1156693
Change-Id: Icd01b43ff2bfaec12a136e232d46376707c5d168
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2625527
Commit-Queue: Jarryd Goodman <jarrydg@chromium.org>
Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843658}
parent ca3c2498
......@@ -252,6 +252,8 @@ class WebAppIntegrationBrowserTest
UninstallFromMenu();
} else if (action_string == "uninstall_internal") {
UninstallInternal();
} else if (action_string == "assert_app_in_list_not_windowed") {
AssertAppInListNotWindowed();
} else if (action_string == "assert_app_not_in_list") {
AssertAppNotInList();
} else if (action_string == "assert_installable") {
......@@ -467,6 +469,14 @@ class WebAppIntegrationBrowserTest
}
// Assert Actions
void AssertAppInListNotWindowed() {
EXPECT_TRUE(base::Contains(app_ids_, app_id_));
WebAppProviderBase* const provider =
WebAppProviderBase::GetProviderBase(browser()->profile());
AppRegistrar& app_registrar = provider->registrar();
DisplayMode display_mode = app_registrar.GetAppUserDisplayMode(app_id_);
EXPECT_FALSE(display_mode == blink::mojom::DisplayMode::kStandalone);
}
void AssertAppNotInList() { EXPECT_FALSE(base::Contains(app_ids_, app_id_)); }
void AssertInstallable() { EXPECT_TRUE(last_navigation_result_.installable); }
......
......@@ -4,7 +4,13 @@ navigate_installable,assert_installable,install_omnibox_or_menu, navigate_browse
navigate_installable, install_create_shortcut_tabbed, set_open_in_window_internal, launch_internal, assert_window_created,
navigate_installable_site_a, assert_install_icon_shown, install_omnibox_or_menu, assert_window_created, launch_internal, close_pwa, assert_no_crash,
add_policy_app_internal_tabbed, remove_policy_app, list_apps_internal, assert_app_not_in_list,
# Journey 149
navigate_installable, install_omnibox_or_menu, list_apps_internal, set_open_in_tab_internal, list_apps_internal, assert_app_in_list_not_windowed
# Journey 150
navigate_installable, install_omnibox_or_menu, list_apps_internal, set_open_in_tab_internal, list_apps_internal, launch_internal, assert_tab_created
# Journey 151
navigate_installable, install_omnibox_or_menu, list_apps_internal, set_open_in_tab_internal, launch_internal, assert_tab_created,
navigate_installable, install_omnibox_or_menu, list_apps_internal, set_open_in_tab_internal, launch_internal, assert_tab_created,
# Jouney 152
navigate_installable, install_omnibox_or_menu, list_apps_internal, set_open_in_tab_internal, navigate_browser_in_scope, assert_install_icon_shown
Linux, Mac, Win | navigate_installable,install_omnibox_or_menu,launch_internal, uninstall_from_menu,navigate_browser_in_scope, assert_install_icon_shown,assert_launch_icon_not_shown,
ChromeOS | navigate_installable,install_omnibox_or_menu,launch_internal, uninstall_internal,navigate_browser_in_scope, assert_install_icon_shown,assert_launch_icon_not_shown,
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