Chromium Code Reviews| Index: ios/chrome/browser/ui/toolbar/toolbar_egtest.mm |
| diff --git a/ios/chrome/browser/ui/toolbar/toolbar_egtest.mm b/ios/chrome/browser/ui/toolbar/toolbar_egtest.mm |
| index a4aa7355b100a5b2506f83a4d317bce7b68ee919..f4e94857590af7dee3bcb7e6eea4603033ccc08c 100644 |
| --- a/ios/chrome/browser/ui/toolbar/toolbar_egtest.mm |
| +++ b/ios/chrome/browser/ui/toolbar/toolbar_egtest.mm |
| @@ -353,6 +353,10 @@ void SelectNewTabPagePanel(NewTabPage::PanelIdentifier panel_type) { |
| // Tests typing in the omnibox. |
| - (void)testToolbarOmniboxTyping { |
| + // TODO(crbug.com/642559): Enable this test for iPad when typing bug is fixed. |
| + if (IsIPadIdiom()) { |
| + EARL_GREY_TEST_DISABLED(@"Disabled for iPad due to a simulator bug."); |
| + } |
| SelectNewTabPagePanel(NewTabPage::kMostVisitedPanel); |
| id<GREYMatcher> locationbarButton = grey_allOf( |
| @@ -433,21 +437,15 @@ void SelectNewTabPagePanel(NewTabPage::PanelIdentifier panel_type) { |
| nil)] |
| assertWithMatcher:grey_sufficientlyVisible()]; |
| - // TODO(crbug.com/642559): Enable these steps for iPad when typing bug |
| - // is fixed. |
| - if (IsIPadIdiom()) { |
| - EARL_GREY_TEST_DISABLED(@"Disabled for iPad due to a simulator bug."); |
| - } else { |
| - NSString* cancelButton = l10n_util::GetNSString(IDS_CANCEL); |
| - NSString* typingShield = @"Hide keyboard"; |
| - NSString* clearText = IsIPadIdiom() ? typingShield : cancelButton; |
| + NSString* cancelButton = l10n_util::GetNSString(IDS_CANCEL); |
|
Eugene But (OOO till 7-30)
2017/03/21 22:53:24
Optional nit:
s/cancelButton/cancelButtonText
baxley
2017/03/21 22:56:53
Sure!
|
| + NSString* typingShield = @"Hide keyboard"; |
| + NSString* clearText = IsIPadIdiom() ? typingShield : cancelButton; |
| - [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(clearText)] |
| - performAction:grey_tap()]; |
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] |
| - assertWithMatcher:chrome_test_util::OmniboxText("")]; |
| + [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(clearText)] |
| + performAction:grey_tap()]; |
| + [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] |
| + assertWithMatcher:chrome_test_util::OmniboxText("")]; |
| - SelectNewTabPagePanel(NewTabPage::kMostVisitedPanel); |
| - } |
| + SelectNewTabPagePanel(NewTabPage::kMostVisitedPanel); |
| } |
| @end |