Commit 1559e5ae authored by zhaoyangli's avatar zhaoyangli Committed by Commit Bot

[iOS] Modify comments and default value for app relaunch EG2 utilities.

- Modified comments for |-ensureAppLaunchedWithConfiguration:| method of
  |AppLaunchManager| reminding users to choose suitable place to call
  this method for better efficiency.
- Changed default value of |RelaunchPolicy| in |AppLaunchConfiguration|
  to |NoForceRelaunchAndResetState| which is more commonly used when
  user relaunches the app for different enabled features.

Bug: 1009017
Change-Id: I523304d387d5f873a33cc0b72023d9eafe6e7c20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2073137Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Zhaoyang Li <zhaoyangli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#744820}
parent 8a3fb1c0
...@@ -39,7 +39,7 @@ struct AppLaunchConfiguration { ...@@ -39,7 +39,7 @@ struct AppLaunchConfiguration {
// Enabled trigger variations. // Enabled trigger variations.
std::vector<variations::VariationID> trigger_variations_enabled; std::vector<variations::VariationID> trigger_variations_enabled;
// Relaunch policy. // Relaunch policy.
RelaunchPolicy relaunch_policy = NoForceRelaunchAndKeepState; RelaunchPolicy relaunch_policy = NoForceRelaunchAndResetState;
}; };
#endif // IOS_TESTING_EARL_GREY_APP_LAUNCH_CONFIGURATION_H_ #endif // IOS_TESTING_EARL_GREY_APP_LAUNCH_CONFIGURATION_H_
...@@ -40,12 +40,13 @@ ...@@ -40,12 +40,13 @@
// Otherwise, the app will be activated instead of (re)launched. // Otherwise, the app will be activated instead of (re)launched.
// Will wait until app is activated or launched, and fail the test if it // Will wait until app is activated or launched, and fail the test if it
// fails to do so. // fails to do so.
// |relaunchPolicy| controls relaunch manners. // |configuration| sets features, variations and relaunch manners.
// If you're trying to call this method in |-setUp()|, please put it in
// |-launchAppForTestMethod()| instead for better efficiency.
- (void)ensureAppLaunchedWithConfiguration: - (void)ensureAppLaunchedWithConfiguration:
(AppLaunchConfiguration)configuration; (AppLaunchConfiguration)configuration;
// See ensureAppLaunchedWithFeaturesEnabled:disabled:variations: // See ensureAppLaunchedWithConfiguration: for details.
// triggerVariations:relaunchPolicy: for details.
- (void)ensureAppLaunchedWithFeaturesEnabled: - (void)ensureAppLaunchedWithFeaturesEnabled:
(std::vector<base::Feature>)featuresEnabled (std::vector<base::Feature>)featuresEnabled
disabled:(std::vector<base::Feature>) disabled:(std::vector<base::Feature>)
......
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