Skip to content

Commit

Permalink
[dPWA Testing] Changing all args from strings to enums
Browse files Browse the repository at this point in the history
Bug: 1316807
Change-Id: I2d7a94b2b2669f78f319d912ab85988c5e59e00b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3587617
Reviewed-by: Phillis Tang <phillis@chromium.org>
Auto-Submit: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#993989}
  • Loading branch information
dmurph authored and Chromium LUCI CQ committed Apr 20, 2022
1 parent 751b874 commit cc6db37
Show file tree
Hide file tree
Showing 28 changed files with 5,558 additions and 5,545 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "chrome/browser/sync/test/integration/two_client_web_apps_integration_test_base.h"
#include "content/public/test/browser_test.h"

namespace web_app {
namespace web_app::integration_tests {
namespace {

// This test is a part of the web app integration test suite, which is
Expand All @@ -19,4 +19,4 @@ namespace {
using TwoClientWebAppsIntegrationTest = TwoClientWebAppsIntegrationTestBase;

} // namespace
} // namespace web_app
} // namespace web_app::integration_tests
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "services/network/public/cpp/network_switches.h"

namespace web_app {
namespace web_app::integration_tests {

TwoClientWebAppsIntegrationTestBase::TwoClientWebAppsIntegrationTestBase()
: WebAppsSyncTestBase(TWO_CLIENT), helper_(this) {}
Expand Down Expand Up @@ -91,4 +91,4 @@ void TwoClientWebAppsIntegrationTestBase::SetUpCommandLine(
command_line->AppendSwitch("disable-fake-server-failure-output");
}

} // namespace web_app
} // namespace web_app::integration_tests
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ namespace base {
class CommandLine;
}

namespace web_app {
namespace web_app::integration_tests {

class TwoClientWebAppsIntegrationTestBase
: public WebAppsSyncTestBase,
: public ::web_app::WebAppsSyncTestBase,
public WebAppIntegrationTestDriver::TestDelegate {
public:
TwoClientWebAppsIntegrationTestBase();
Expand All @@ -43,6 +43,6 @@ class TwoClientWebAppsIntegrationTestBase
WebAppIntegrationTestDriver helper_;
};

} // namespace web_app
} // namespace web_app::integration_tests

#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_TWO_CLIENT_WEB_APPS_INTEGRATION_TEST_BASE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "chrome/browser/sync/test/integration/two_client_web_apps_integration_test_base.h"
#include "content/public/test/browser_test.h"

namespace web_app {
namespace web_app::integration_tests {

// This test is a part of the web app integration test suite, which is
// documented in //chrome/browser/ui/views/web_apps/README.md. For information
Expand All @@ -22,14 +22,14 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallCreateShortcutWindowed("SiteA");
helper_.InstallCreateShortcutWindowed(Site::kSiteA);
helper_.CheckWindowCreated();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed("SiteA");
helper_.NavigateBrowser("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.NavigateBrowser(Site::kSiteA);
helper_.CheckInstallIconNotShown();
helper_.CheckLaunchIconShown();
}
Expand All @@ -40,18 +40,18 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallCreateShortcutWindowed("SiteA");
helper_.InstallCreateShortcutWindowed(Site::kSiteA);
helper_.CheckWindowCreated();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.SyncTurnOff();
helper_.UninstallFromList("SiteA");
helper_.UninstallFromList(Site::kSiteA);
helper_.SyncTurnOn();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
}

IN_PROC_BROWSER_TEST_F(
Expand All @@ -60,17 +60,17 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallCreateShortcutWindowed("SiteA");
helper_.InstallCreateShortcutWindowed(Site::kSiteA);
helper_.CheckWindowCreated();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed("SiteA");
helper_.UninstallFromList("SiteA");
helper_.CheckAppNotInList("SiteA");
helper_.SwitchProfileClients("Client1");
helper_.CheckAppNotInList("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.UninstallFromList(Site::kSiteA);
helper_.CheckAppNotInList(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient1);
helper_.CheckAppNotInList(Site::kSiteA);
}

IN_PROC_BROWSER_TEST_F(
Expand All @@ -79,14 +79,14 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallOmniboxIcon("SiteA");
helper_.InstallOmniboxIcon(InstallableSite::kSiteA);
helper_.CheckWindowCreated();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed("SiteA");
helper_.NavigateBrowser("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.NavigateBrowser(Site::kSiteA);
helper_.CheckInstallIconNotShown();
helper_.CheckLaunchIconShown();
}
Expand All @@ -97,18 +97,18 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallOmniboxIcon("SiteA");
helper_.InstallOmniboxIcon(InstallableSite::kSiteA);
helper_.CheckWindowCreated();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.SyncTurnOff();
helper_.UninstallFromList("SiteA");
helper_.UninstallFromList(Site::kSiteA);
helper_.SyncTurnOn();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
}

IN_PROC_BROWSER_TEST_F(
Expand All @@ -117,17 +117,17 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallOmniboxIcon("SiteA");
helper_.InstallOmniboxIcon(InstallableSite::kSiteA);
helper_.CheckWindowCreated();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed("SiteA");
helper_.UninstallFromList("SiteA");
helper_.CheckAppNotInList("SiteA");
helper_.SwitchProfileClients("Client1");
helper_.CheckAppNotInList("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.UninstallFromList(Site::kSiteA);
helper_.CheckAppNotInList(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient1);
helper_.CheckAppNotInList(Site::kSiteA);
}

IN_PROC_BROWSER_TEST_F(
Expand All @@ -136,14 +136,14 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallMenuOption("SiteA");
helper_.InstallMenuOption(InstallableSite::kSiteA);
helper_.CheckWindowCreated();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed("SiteA");
helper_.NavigateBrowser("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.NavigateBrowser(Site::kSiteA);
helper_.CheckInstallIconNotShown();
helper_.CheckLaunchIconShown();
}
Expand All @@ -154,18 +154,18 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallMenuOption("SiteA");
helper_.InstallMenuOption(InstallableSite::kSiteA);
helper_.CheckWindowCreated();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.SyncTurnOff();
helper_.UninstallFromList("SiteA");
helper_.UninstallFromList(Site::kSiteA);
helper_.SyncTurnOn();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
}

IN_PROC_BROWSER_TEST_F(
Expand All @@ -174,17 +174,17 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallMenuOption("SiteA");
helper_.InstallMenuOption(InstallableSite::kSiteA);
helper_.CheckWindowCreated();
helper_.CheckAppInListWindowed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListWindowed("SiteA");
helper_.UninstallFromList("SiteA");
helper_.CheckAppNotInList("SiteA");
helper_.SwitchProfileClients("Client1");
helper_.CheckAppNotInList("SiteA");
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListWindowed(Site::kSiteA);
helper_.UninstallFromList(Site::kSiteA);
helper_.CheckAppNotInList(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient1);
helper_.CheckAppNotInList(Site::kSiteA);
}

IN_PROC_BROWSER_TEST_F(
Expand All @@ -193,13 +193,13 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallCreateShortcutTabbed("SiteA");
helper_.CheckAppInListTabbed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListTabbed("SiteA");
helper_.LaunchFromChromeApps("SiteA");
helper_.InstallCreateShortcutTabbed(Site::kSiteA);
helper_.CheckAppInListTabbed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListTabbed(Site::kSiteA);
helper_.LaunchFromChromeApps(Site::kSiteA);
helper_.CheckTabCreated();
}

Expand All @@ -209,17 +209,17 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallCreateShortcutTabbed("SiteA");
helper_.CheckAppInListTabbed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListTabbed("SiteA");
helper_.InstallCreateShortcutTabbed(Site::kSiteA);
helper_.CheckAppInListTabbed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListTabbed(Site::kSiteA);
helper_.SyncTurnOff();
helper_.UninstallFromList("SiteA");
helper_.UninstallFromList(Site::kSiteA);
helper_.SyncTurnOn();
helper_.CheckAppInListTabbed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListTabbed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
}

IN_PROC_BROWSER_TEST_F(
Expand All @@ -228,17 +228,17 @@ IN_PROC_BROWSER_TEST_F(
// Test contents are generated by script. Please do not modify!
// See `chrome/test/webapps/README.md` for more info.
// Sheriffs: Disabling this test is supported.
helper_.InstallCreateShortcutTabbed("SiteA");
helper_.CheckAppInListTabbed("SiteA");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.SwitchProfileClients("Client2");
helper_.CheckPlatformShortcutAndIcon("SiteA");
helper_.CheckAppInListTabbed("SiteA");
helper_.UninstallFromList("SiteA");
helper_.CheckAppNotInList("SiteA");
helper_.SwitchProfileClients("Client1");
helper_.CheckAppNotInList("SiteA");
helper_.InstallCreateShortcutTabbed(Site::kSiteA);
helper_.CheckAppInListTabbed(Site::kSiteA);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient2);
helper_.CheckPlatformShortcutAndIcon(Site::kSiteA);
helper_.CheckAppInListTabbed(Site::kSiteA);
helper_.UninstallFromList(Site::kSiteA);
helper_.CheckAppNotInList(Site::kSiteA);
helper_.SwitchProfileClients(ProfileClient::kClient1);
helper_.CheckAppNotInList(Site::kSiteA);
}

} // namespace
} // namespace web_app
} // namespace web_app::integration_tests
Loading

0 comments on commit cc6db37

Please sign in to comment.