Commit bf8d79b5 authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Updates PasswordSettingsTestCase.testExportFlow for iOS13 beta4.

The system share menu now presents fullscreen when apps are compiled
with the iOS 12 SDK.  This causes the "Export Passwords" button to be
completely removed from the view hierarchy rather than just disabled.

BUG=983143

Change-Id: If02a5782679d376a1e232869add89f794c97f9b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1708840Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678897}
parent 200db42d
......@@ -1521,12 +1521,22 @@ PasswordForm CreateSampleFormWithIndex(int index) {
// Wait until the alerts are dismissed.
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
// Check that export button is disabled
// On iOS 13+ when building with the iOS 12 SDK, the share sheet is presented
// fullscreen, so the export button is removed from the view hierarchy. Check
// that the button is not present. Otherwise, the export button should remain
// visible but be disabled.
id<GREYMatcher> exportButtonStatusMatcher =
grey_accessibilityTrait(UIAccessibilityTraitNotEnabled);
#if !defined(__IPHONE_13_0) || (__IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_13_0)
if (base::ios::IsRunningOnIOS13OrLater()) {
exportButtonStatusMatcher = grey_nil();
}
#endif
[[EarlGrey
selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId(
IDS_IOS_EXPORT_PASSWORDS)]
assertWithMatcher:grey_accessibilityTrait(
UIAccessibilityTraitNotEnabled)];
assertWithMatcher:exportButtonStatusMatcher];
if ([ChromeEarlGrey isIPadIdiom]) {
// Tap outside the activity view to dismiss it, because it is not
......
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