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

Side by Side Diff: ios/chrome/browser/web/browsing_egtest.mm

Issue 2777463002: Make custom GREYAction methods Chromium C-Style. (Closed)
Patch Set: more c-style Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/settings/block_popups_egtest.mm ('k') | ios/chrome/test/earl_grey/chrome_actions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698