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

Side by Side Diff: ios/web/shell/test/earl_grey/shell_earl_grey.mm

Issue 2340533004: [ios] Implemented -[ShellEarlGrey loadURL:]. (Closed)
Patch Set: Addressed review comments Created 4 years, 3 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/web/shell/test/earl_grey/shell_earl_grey.h ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "ios/web/shell/test/earl_grey/shell_earl_grey.h"
6
7 #import <EarlGrey/EarlGrey.h>
8
9 #import "ios/web/public/test/earl_grey/js_test_util.h"
10 #include "ios/web/shell/test/app/navigation_test_util.h"
11 #import "ios/web/shell/test/app/web_shell_test_util.h"
12
13 namespace {
14 const NSTimeInterval kWaitForPageLoadTimeout = 10.0;
15 } // namespace
16
17 @implementation ShellEarlGrey
18
19 + (void)loadURL:(const GURL&)URL {
20 web::shell_test_util::LoadUrl(URL);
21
22 // Make sure that the page started loading.
23 GREYAssert(web::shell_test_util::IsLoading(), @"Page did not start loading.");
24
25 GREYCondition* condition =
26 [GREYCondition conditionWithName:@"Wait for page to complete loading."
27 block:^BOOL {
28 return !web::shell_test_util::IsLoading();
29 }];
30 GREYAssert([condition waitWithTimeout:kWaitForPageLoadTimeout],
31 @"Page did not complete loading.");
32
33 web::WebState* webState = web::shell_test_util::GetCurrentWebState();
34 if (webState->ContentIsHTML())
35 web::WaitUntilWindowIdInjected(webState);
36 }
37
38 @end
OLDNEW
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_earl_grey.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698