| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import <EarlGrey/EarlGrey.h> | 5 #import <EarlGrey/EarlGrey.h> |
| 6 #import <UIKit/UIKit.h> | 6 #import <UIKit/UIKit.h> |
| 7 #import <XCTest/XCTest.h> | 7 #import <XCTest/XCTest.h> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 usingSearchAction:grey_scrollInDirection(kGREYDirectionDown, | 266 usingSearchAction:grey_scrollInDirection(kGREYDirectionDown, |
| 267 kScrollDisplacement) | 267 kScrollDisplacement) |
| 268 onElementWithMatcher:toolsMenuTableViewMatcher] performAction:grey_tap()]; | 268 onElementWithMatcher:toolsMenuTableViewMatcher] performAction:grey_tap()]; |
| 269 [[[EarlGrey selectElementWithMatcher:settingToTap] | 269 [[[EarlGrey selectElementWithMatcher:settingToTap] |
| 270 usingSearchAction:grey_scrollInDirection(kGREYDirectionDown, | 270 usingSearchAction:grey_scrollInDirection(kGREYDirectionDown, |
| 271 kScrollDisplacement) | 271 kScrollDisplacement) |
| 272 onElementWithMatcher:settingsCollectionViewMatcher] | 272 onElementWithMatcher:settingsCollectionViewMatcher] |
| 273 performAction:grey_tap()]; | 273 performAction:grey_tap()]; |
| 274 } | 274 } |
| 275 | 275 |
| 276 // Closes the a sub-settings menu, and then the general Settings menu. | 276 // Closes a sub-settings menu, and then the general Settings menu. |
| 277 - (void)closeSubSettingsMenu { | 277 - (void)closeSubSettingsMenu { |
| 278 [[EarlGrey | 278 [[EarlGrey |
| 279 selectElementWithMatcher:grey_allOf( | 279 selectElementWithMatcher:grey_allOf( |
| 280 grey_accessibilityID(@"back_bar_button"), | 280 grey_accessibilityID(@"ic_arrow_back"), |
| 281 grey_accessibilityTrait( | 281 grey_accessibilityTrait( |
| 282 UIAccessibilityTraitButton), | 282 UIAccessibilityTraitButton), |
| 283 nil)] performAction:grey_tap()]; | 283 nil)] performAction:grey_tap()]; |
| 284 [[EarlGrey | 284 [[EarlGrey |
| 285 selectElementWithMatcher:chrome_test_util::buttonWithAccessibilityLabelId( | 285 selectElementWithMatcher:chrome_test_util::buttonWithAccessibilityLabelId( |
| 286 IDS_IOS_NAVIGATION_BAR_DONE_BUTTON)] | 286 IDS_IOS_NAVIGATION_BAR_DONE_BUTTON)] |
| 287 performAction:grey_tap()]; | 287 performAction:grey_tap()]; |
| 288 } | 288 } |
| 289 | 289 |
| 290 // Performs the steps to clear browsing data. Must be called on the | 290 // Performs the steps to clear browsing data. Must be called on the |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 } | 859 } |
| 860 | 860 |
| 861 // Verifies the UI elements are accessible on the Voice Search page. | 861 // Verifies the UI elements are accessible on the Voice Search page. |
| 862 - (void)testAccessibilityOnVoiceSearch { | 862 - (void)testAccessibilityOnVoiceSearch { |
| 863 [self openSubSettingMenu:voiceSearchButton()]; | 863 [self openSubSettingMenu:voiceSearchButton()]; |
| 864 chrome_test_util::VerifyAccessibilityForCurrentScreen(); | 864 chrome_test_util::VerifyAccessibilityForCurrentScreen(); |
| 865 [self closeSubSettingsMenu]; | 865 [self closeSubSettingsMenu]; |
| 866 } | 866 } |
| 867 | 867 |
| 868 @end | 868 @end |
| OLD | NEW |