| 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 8f28c35173b0f3b49c0cf8c668d2cb4e3adf05c7..926c53dfb92395cc11dac6511a78019c5ce0651e 100644
|
| --- a/ios/chrome/browser/ui/settings/settings_egtest.mm
|
| +++ b/ios/chrome/browser/ui/settings/settings_egtest.mm
|
| @@ -266,6 +266,11 @@ bool IsCertificateCleared() {
|
|
|
| } // namespace
|
|
|
| +// Expose the first responder.
|
| +@interface UIWindow (FirstResponder)
|
| +- (UIResponder*)firstResponder;
|
| +@end
|
| +
|
| // Settings tests for Chrome.
|
| @interface SettingsTestCase : ChromeTestCase
|
| @end
|
| @@ -954,4 +959,20 @@ bool IsCertificateCleared() {
|
| [self closeSubSettingsMenu];
|
| }
|
|
|
| +// Tests that hitting the tab key doesn't trigger the omnibox in the background.
|
| +// Testing against regressions of the fix for crbug.com/676993.
|
| +- (void)testTabKeyIsANoOp {
|
| + // Open Settings.
|
| + [ChromeEarlGreyUI openToolsMenu];
|
| + [[EarlGrey selectElementWithMatcher:SettingsButton()]
|
| + performAction:grey_tap()];
|
| +
|
| + // Hit the tab key.
|
| + // TODO(crbug.com/695876): Simulate a tab key press with EalrGrey.
|
| +
|
| + // Verify that the omnibox is not focused.
|
| + GREYAssertFalse([[[[UIApplication sharedApplication] keyWindow]
|
| + firstResponder] isKindOfClass:[UITextField class]]);
|
| +}
|
| +
|
| @end
|
|
|