Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: ios/chrome/browser/web/browsing_egtest.mm

Issue 2793233004: Add wait to testBrowsingPostEntryWithKeyboard. (Closed)
Patch Set: edit naming Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web/browsing_egtest.mm
diff --git a/ios/chrome/browser/web/browsing_egtest.mm b/ios/chrome/browser/web/browsing_egtest.mm
index a134f5b1983d82db9f3f647d9ebba49ee8968832..b66f036e6a4770b9103704ad970a07a2c9ad2c4a 100644
--- a/ios/chrome/browser/web/browsing_egtest.mm
+++ b/ios/chrome/browser/web/browsing_egtest.mm
@@ -579,8 +579,8 @@ id<GREYMatcher> GoButtonMatcher() {
}
// Tap the text field indicated by |ID| to open the keyboard, and then
-// press the keyboard's "Go" button.
-- (void)openKeyboardAndTapGoButtonWithTextFieldID:(const std::string&)ID {
+// press the keyboard's "Go" button to submit the form.
+- (void)submitFormUsingKeyboardGoButtonWithInputID:(const std::string&)ID {
// Disable EarlGrey's synchronization since it is blocked by opening the
// keyboard from a web view.
[[GREYConfiguration sharedInstance]
@@ -627,6 +627,9 @@ id<GREYMatcher> GoButtonMatcher() {
[[GREYConfiguration sharedInstance]
setValue:@YES
forConfigKey:kGREYConfigKeySynchronizationEnabled];
+
+ // Ensure that the new page loaded before continuing.
+ [ChromeEarlGrey waitForPageToFinishLoading];
}
// Tests that submitting a POST-based form by tapping the 'Go' button on the
@@ -656,7 +659,7 @@ id<GREYMatcher> GoButtonMatcher() {
[[EarlGrey selectElementWithMatcher:WebViewContainingText("hello!")]
assertWithMatcher:grey_notNil()];
- [self openKeyboardAndTapGoButtonWithTextFieldID:"textfield"];
+ [self submitFormUsingKeyboardGoButtonWithInputID:"textfield"];
// Verify that the browser navigates to the expected URL.
[[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698