Chromium Code Reviews| Index: ios/chrome/browser/ui/settings/settings_egtest.mm |
| diff --git a/ios/chrome/browser/ui/settings/settings_egtest.mm b/ios/chrome/browser/ui/settings/settings_egtest.mm |
| index 842ce36d2fbcae2632205ad508308a9678003684..497bf66649ed51c6eee58382122b355c48958f54 100644 |
| --- a/ios/chrome/browser/ui/settings/settings_egtest.mm |
| +++ b/ios/chrome/browser/ui/settings/settings_egtest.mm |
| @@ -145,6 +145,35 @@ id<GREYMatcher> voiceSearchButton() { |
| grey_accessibilityTrait(UIAccessibilityTraitButton), nil); |
| } |
| +// Matcher for the Preload Webpages button on the bandwidth UI. |
| +id<GREYMatcher> bandwidthPreloadWebpagesButton() { |
|
baxley
2017/01/20 23:24:58
Would you mind making these 4 matchers start with
lindsayw
2017/01/24 18:46:57
Done.
|
| + return grey_allOf( |
| + buttonWithAccessibilityLabelId(IDS_IOS_OPTIONS_PRELOAD_WEBPAGES), |
| + grey_not(grey_accessibilityTrait(UIAccessibilityTraitKeyboardKey)), nil); |
|
baxley
2017/01/20 23:24:58
do we need the matcher for not UIAccessibilityTrai
lindsayw
2017/01/24 18:46:57
Good point, updated.
|
| +} |
| + |
| +// Matcher for the Privacy Handoff button on the privacy UI. |
| +id<GREYMatcher> privacyHandoffButton() { |
| + return grey_allOf( |
| + buttonWithAccessibilityLabelId( |
| + IDS_IOS_OPTIONS_ENABLE_HANDOFF_TO_OTHER_DEVICES), |
| + grey_not(grey_accessibilityTrait(UIAccessibilityTraitKeyboardKey)), nil); |
| +} |
| + |
| +// Matcher for the Privacy Block Popups button on the privacy UI. |
| +id<GREYMatcher> blockPopupsButton() { |
| + return grey_allOf( |
| + buttonWithAccessibilityLabelId(IDS_IOS_BLOCK_POPUPS), |
| + grey_not(grey_accessibilityTrait(UIAccessibilityTraitKeyboardKey)), nil); |
| +} |
| + |
| +// Matcher for the Privacy Translate Settings button on the privacy UI. |
| +id<GREYMatcher> translateSettingsButton() { |
| + return grey_allOf( |
| + buttonWithAccessibilityLabelId(IDS_IOS_TRANSLATE_SETTING), |
| + grey_not(grey_accessibilityTrait(UIAccessibilityTraitKeyboardKey)), nil); |
| +} |
| + |
| // Asserts that there is no cookie in current web state. |
| void AssertNoCookieExists() { |
| NSError* error = nil; |
| @@ -790,6 +819,28 @@ bool IsCertificateCleared() { |
| [self closeSubSettingsMenu]; |
| } |
| +// Verifies the UI elements are accessibile on the Content Settings |
|
rohitrao (ping after 24h)
2017/01/23 12:55:30
"Accessible", here and below.
lindsayw
2017/01/24 18:46:57
accessibile->accessible - Done.
|
| +// Block Popups page. |
| +- (void)testAccessibilityOnContentSettingsBlockPopupsPage { |
| + [self openSubSettingMenu:chrome_test_util::buttonWithAccessibilityLabelId( |
| + IDS_IOS_CONTENT_SETTINGS_TITLE)]; |
| + [[EarlGrey selectElementWithMatcher:blockPopupsButton()] |
| + performAction:grey_tap()]; |
| + chrome_test_util::VerifyAccessibilityForCurrentScreen(); |
| + [self closeSubSettingsMenu]; |
| +} |
| + |
| +// Verifies the UI elements are accessibile on the Content Translations Settings |
| +// page. |
| +- (void)testAccessibilityOnContentSettingsTranslatePage { |
| + [self openSubSettingMenu:chrome_test_util::buttonWithAccessibilityLabelId( |
| + IDS_IOS_CONTENT_SETTINGS_TITLE)]; |
| + [[EarlGrey selectElementWithMatcher:translateSettingsButton()] |
| + performAction:grey_tap()]; |
| + chrome_test_util::VerifyAccessibilityForCurrentScreen(); |
| + [self closeSubSettingsMenu]; |
| +} |
| + |
| // Verifies the UI elements are accessibile on the Privacy Settings page. |
| - (void)testAccessibilityOnPrivacySettingsPage { |
| [self openSubSettingMenu:chrome_test_util::buttonWithAccessibilityLabelId( |
| @@ -798,6 +849,28 @@ bool IsCertificateCleared() { |
| [self closeSubSettingsMenu]; |
| } |
| +// Verifies the UI elements are accessibile on the Privacy Handoff Settings |
| +// page. |
| +- (void)testAccessibilityOnPrivacyHandoffSettingsPage { |
| + [self openSubSettingMenu:chrome_test_util::buttonWithAccessibilityLabelId( |
| + IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY)]; |
| + [[EarlGrey selectElementWithMatcher:privacyHandoffButton()] |
| + performAction:grey_tap()]; |
| + chrome_test_util::VerifyAccessibilityForCurrentScreen(); |
| + [self closeSubSettingsMenu]; |
| +} |
| + |
| +// Verifies the UI elements are accessibile on the Privacy Clear Browsing Data |
| +// Settings page. |
| +- (void)testAccessibilityOnPrivacyClearBrowsingHistoryPage { |
| + [self openSubSettingMenu:chrome_test_util::buttonWithAccessibilityLabelId( |
| + IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY)]; |
| + [[EarlGrey selectElementWithMatcher:clearBrowsingDataButton()] |
|
rohitrao (ping after 24h)
2017/01/23 13:07:36
Have you tried running this test on a 5S in landsc
lindsayw
2017/01/24 18:46:57
All of these tests fail, not only mine, in 5s land
|
| + performAction:grey_tap()]; |
| + chrome_test_util::VerifyAccessibilityForCurrentScreen(); |
| + [self closeSubSettingsMenu]; |
| +} |
| + |
| // Verifies the UI elements are accessibile on the Bandwidth Management Settings |
| // page. |
| - (void)testAccessibilityOnBandwidthManagementSettingsPage { |
| @@ -807,6 +880,17 @@ bool IsCertificateCleared() { |
| [self closeSubSettingsMenu]; |
| } |
| +// Verifies the UI elements are accessibile on the Bandwidth Preload Webpages |
| +// Settings page. |
| +- (void)testAccessibilityOnBandwidthPreloadWebpagesSettingsPage { |
| + [self openSubSettingMenu:chrome_test_util::buttonWithAccessibilityLabelId( |
| + IDS_IOS_BANDWIDTH_MANAGEMENT_SETTINGS)]; |
| + [[EarlGrey selectElementWithMatcher:bandwidthPreloadWebpagesButton()] |
| + performAction:grey_tap()]; |
| + chrome_test_util::VerifyAccessibilityForCurrentScreen(); |
| + [self closeSubSettingsMenu]; |
| +} |
| + |
| // Verifies the UI elements are accessible on the Save Passwords page. |
| - (void)testAccessibilityOnSavePasswords { |
| [ChromeEarlGreyUI openToolsMenu]; |