Commit f33245e6 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

Reland "[ios] Dismiss keyboard when navigating to chrome://flags in test."

This reverts commit 5f5495bb.

Reason for revert: Don't wait for keyboard animation.

Original change's description:
> Revert "[ios] Dismiss keyboard when navigating to chrome://flags in test."
>
> This reverts commit 99473df8.
>
> Reason for revert: Not always working.
>
> Original change's description:
> > [ios] Dismiss keyboard when navigating to chrome://flags in test.
> >
> > On iOS 13 chrome://flags presents the keyboard which does not allow
> > tapping on back button.
> >
> > Bug: 977707
> > Change-Id: Ia0da9e063b894da4fbfccfb12d7d839774c3b230
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1666731
> > Commit-Queue: Eugene But <eugenebut@chromium.org>
> > Auto-Submit: Justin Cohen <justincohen@chromium.org>
> > Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#673082}
>
> TBR=justincohen@chromium.org,eugenebut@chromium.org,michaeldo@chromium.org
>
> Change-Id: Ia4a2f62f4bbd3a9ab46f314b209d09d0f0cb5b61
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 977707
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1681438
> Reviewed-by: Justin Cohen <justincohen@chromium.org>
> Commit-Queue: Justin Cohen <justincohen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#673179}

TBR=justincohen@chromium.org,eugenebut@chromium.org,michaeldo@chromium.org

Change-Id: I6fe54aa0a434fa9d837a04df7ed6853e4f62a1c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 977707
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1681442
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#673314}
parent 759c81d7
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
#import <EarlGrey/EarlGrey.h> #import <EarlGrey/EarlGrey.h>
#import <EarlGrey/GREYKeyboard.h>
#import <XCTest/XCTest.h> #import <XCTest/XCTest.h>
#include "base/mac/foundation_util.h" #include "base/mac/foundation_util.h"
...@@ -141,6 +142,11 @@ id<GREYMatcher> WaitForOmniboxText(std::string text) { ...@@ -141,6 +142,11 @@ id<GREYMatcher> WaitForOmniboxText(std::string text) {
// Navigate to the second URL chrome://flags. // Navigate to the second URL chrome://flags.
LoadWebUIUrl(kChromeUIFlagsHost); LoadWebUIUrl(kChromeUIFlagsHost);
// Navigating to chrome://flags should trigger the keyboard, but pre-iOS13
// this is broken.
if ([GREYKeyboard isKeyboardShown])
[EarlGrey dismissKeyboardWithError:nil];
// Tap the back button in the toolbar and verify that the resulting page's URL // Tap the back button in the toolbar and verify that the resulting page's URL
// corresponds to the first URL chrome://version that was loaded. // corresponds to the first URL chrome://version that was loaded.
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()]; [[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
......
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