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

Side by Side Diff: ios/chrome/test/earl_grey/chrome_earl_grey.mm

Issue 2965963002: [ios] Remove IDC_STOP and IDC_RELOAD
Patch Set: Rebased. Created 3 years, 5 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
« no previous file with comments | « ios/chrome/browser/web/cache_egtest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ios/chrome/test/earl_grey/chrome_earl_grey.h" 5 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 #import <WebKit/WebKit.h> 8 #import <WebKit/WebKit.h>
9 9
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 + (void)loadURL:(const GURL&)URL { 108 + (void)loadURL:(const GURL&)URL {
109 chrome_test_util::LoadUrl(URL); 109 chrome_test_util::LoadUrl(URL);
110 [ChromeEarlGrey waitForPageToFinishLoading]; 110 [ChromeEarlGrey waitForPageToFinishLoading];
111 111
112 web::WebState* webState = chrome_test_util::GetCurrentWebState(); 112 web::WebState* webState = chrome_test_util::GetCurrentWebState();
113 if (webState->ContentIsHTML()) 113 if (webState->ContentIsHTML())
114 web::WaitUntilWindowIdInjected(webState); 114 web::WaitUntilWindowIdInjected(webState);
115 } 115 }
116 116
117 + (void)reload { 117 + (void)reload {
118 base::scoped_nsobject<GenericChromeCommand> reloadCommand( 118 [chrome_test_util::BrowserCommandDispatcherForMainBVC() reload];
119 [[GenericChromeCommand alloc] initWithTag:IDC_RELOAD]);
120 chrome_test_util::RunCommandWithActiveViewController(reloadCommand);
121 [ChromeEarlGrey waitForPageToFinishLoading]; 119 [ChromeEarlGrey waitForPageToFinishLoading];
122 } 120 }
123 121
124 + (void)goBack { 122 + (void)goBack {
125 [chrome_test_util::BrowserCommandDispatcherForMainBVC() goBack]; 123 [chrome_test_util::BrowserCommandDispatcherForMainBVC() goBack];
126 124
127 [ChromeEarlGrey waitForPageToFinishLoading]; 125 [ChromeEarlGrey waitForPageToFinishLoading];
128 } 126 }
129 127
130 + (void)goForward { 128 + (void)goForward {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 GREYCondition* condition = [GREYCondition 194 GREYCondition* condition = [GREYCondition
197 conditionWithName:@"Wait for web view not containing text" 195 conditionWithName:@"Wait for web view not containing text"
198 block:^BOOL { 196 block:^BOOL {
199 return !web::test::IsWebViewContainingText( 197 return !web::test::IsWebViewContainingText(
200 chrome_test_util::GetCurrentWebState(), text); 198 chrome_test_util::GetCurrentWebState(), text);
201 }]; 199 }];
202 GREYAssert([condition waitWithTimeout:testing::kWaitForUIElementTimeout], 200 GREYAssert([condition waitWithTimeout:testing::kWaitForUIElementTimeout],
203 @"Failed waiting for web view not containing %s", text.c_str()); 201 @"Failed waiting for web view not containing %s", text.c_str());
204 } 202 }
205 @end 203 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/cache_egtest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698