Chromium Code Reviews| 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 620 GREYAssert([condition waitWithTimeout:10], | 620 GREYAssert([condition waitWithTimeout:10], |
| 621 @"No keyboard with 'Go' button showed up."); | 621 @"No keyboard with 'Go' button showed up."); |
| 622 | 622 |
| 623 [[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"Go")] | 623 [[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"Go")] |
| 624 performAction:grey_tap()]; | 624 performAction:grey_tap()]; |
| 625 | 625 |
| 626 // Reenable synchronization now that the keyboard has been closed. | 626 // Reenable synchronization now that the keyboard has been closed. |
| 627 [[GREYConfiguration sharedInstance] | 627 [[GREYConfiguration sharedInstance] |
| 628 setValue:@YES | 628 setValue:@YES |
| 629 forConfigKey:kGREYConfigKeySynchronizationEnabled]; | 629 forConfigKey:kGREYConfigKeySynchronizationEnabled]; |
| 630 | |
| 631 // Ensure that the new page loaded before continuing. | |
| 632 [ChromeEarlGrey waitForPageToFinishLoading]; | |
|
Eugene But (OOO till 7-30)
2017/04/05 04:52:41
According to API contract this method just enters
gchatz
2017/04/05 23:43:53
In order for Go to be in the keyboard, the textfie
Eugene But (OOO till 7-30)
2017/04/06 00:28:18
The method name is |openKeyboardAndTapGoButtonWith
| |
| 630 } | 633 } |
| 631 | 634 |
| 632 // Tests that submitting a POST-based form by tapping the 'Go' button on the | 635 // Tests that submitting a POST-based form by tapping the 'Go' button on the |
| 633 // keyboard navigates to the correct URL and the back button works as expected | 636 // keyboard navigates to the correct URL and the back button works as expected |
| 634 // afterwards. | 637 // afterwards. |
| 635 // TODO(crbug.com/704618): Re-enable this test when the flake is fixed. | 638 // TODO(crbug.com/704618): Re-enable this test when the flake is fixed. |
| 636 - (void)FLAKY_testBrowsingPostEntryWithKeyboard { | 639 - (void)FLAKY_testBrowsingPostEntryWithKeyboard { |
| 637 // Create map of canned responses and set up the test HTML server. | 640 // Create map of canned responses and set up the test HTML server. |
| 638 std::map<GURL, std::string> responses; | 641 std::map<GURL, std::string> responses; |
| 639 const GURL URL = | 642 const GURL URL = |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 662 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())] | 665 [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())] |
| 663 assertWithMatcher:grey_notNil()]; | 666 assertWithMatcher:grey_notNil()]; |
| 664 | 667 |
| 665 // Go back and verify that the browser navigates to the original URL. | 668 // Go back and verify that the browser navigates to the original URL. |
| 666 [self goBack]; | 669 [self goBack]; |
| 667 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] | 670 [[EarlGrey selectElementWithMatcher:OmniboxText(URL.GetContent())] |
| 668 assertWithMatcher:grey_notNil()]; | 671 assertWithMatcher:grey_notNil()]; |
| 669 } | 672 } |
| 670 | 673 |
| 671 @end | 674 @end |
| OLD | NEW |