| 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 <XCTest/XCTest.h> | 5 #import <XCTest/XCTest.h> |
| 6 #include <map> | 6 #include <map> |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 assertWithMatcher:grey_interactable() | 598 assertWithMatcher:grey_interactable() |
| 599 error:&error]; | 599 error:&error]; |
| 600 return !error; | 600 return !error; |
| 601 }]; | 601 }]; |
| 602 GREYAssert( | 602 GREYAssert( |
| 603 [interactableCondition waitWithTimeout:testing::kWaitForUIElementTimeout], | 603 [interactableCondition waitWithTimeout:testing::kWaitForUIElementTimeout], |
| 604 @"Web view did not become interactable."); | 604 @"Web view did not become interactable."); |
| 605 | 605 |
| 606 web::WebState* currentWebState = chrome_test_util::GetCurrentWebState(); | 606 web::WebState* currentWebState = chrome_test_util::GetCurrentWebState(); |
| 607 [[EarlGrey selectElementWithMatcher:web::WebViewInWebState(currentWebState)] | 607 [[EarlGrey selectElementWithMatcher:web::WebViewInWebState(currentWebState)] |
| 608 performAction:web::webViewTapElement(currentWebState, ID)]; | 608 performAction:web::WebViewTapElement(currentWebState, ID)]; |
| 609 | 609 |
| 610 // Wait until the keyboard shows up before tapping. | 610 // Wait until the keyboard shows up before tapping. |
| 611 GREYCondition* condition = [GREYCondition | 611 GREYCondition* condition = [GREYCondition |
| 612 conditionWithName:@"Wait for the keyboard to show up." | 612 conditionWithName:@"Wait for the keyboard to show up." |
| 613 block:^BOOL { | 613 block:^BOOL { |
| 614 NSError* error = nil; | 614 NSError* error = nil; |
| 615 [[EarlGrey selectElementWithMatcher:GoButtonMatcher()] | 615 [[EarlGrey selectElementWithMatcher:GoButtonMatcher()] |
| 616 assertWithMatcher:grey_notNil() | 616 assertWithMatcher:grey_notNil() |
| 617 error:&error]; | 617 error:&error]; |
| 618 return (error == nil); | 618 return (error == nil); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())] | 662 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())] |
| 663 assertWithMatcher:grey_notNil()]; | 663 assertWithMatcher:grey_notNil()]; |
| 664 | 664 |
| 665 // Go back and verify that the browser navigates to the original URL. | 665 // Go back and verify that the browser navigates to the original URL. |
| 666 [self goBack]; | 666 [self goBack]; |
| 667 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] | 667 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] |
| 668 assertWithMatcher:grey_notNil()]; | 668 assertWithMatcher:grey_notNil()]; |
| 669 } | 669 } |
| 670 | 670 |
| 671 @end | 671 @end |
| OLD | NEW |