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

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

Issue 2580333003: Upstream Chrome on iOS source code [10/11]. (Closed)
Patch Set: Created 4 years 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
(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 #ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_EARL_GREY_H_
6 #define IOS_CHROME_TEST_EARL_GREY_CHROME_EARL_GREY_H_
7
8 #import <EarlGrey/EarlGrey.h>
9
10 #include "url/gurl.h"
11
12 namespace chrome_test_util {
13
14 // TODO(crbug.com/638674): Evaluate if this can move to shared code.
15 // Execute |javascript| on current web state, and wait for either the completion
16 // of execution or timeout. If |out_error| is not nil, it is set to the
17 // error resulting from the execution, if one occurs. The return value is the
18 // result of the JavaScript execution. If the request is timed out, then nil is
19 // returned.
20 id ExecuteJavaScript(NSString* javascript, NSError** out_error);
21
22 } // namespace chrome_test_util
23
24 // Test methods that perform actions on Chrome. These methods may read or alter
25 // Chrome's internal state programmatically or via the UI, but in both cases
26 // will properly synchronize the UI for Earl Grey tests.
27 @interface ChromeEarlGrey : NSObject
28
29 #pragma mark - History Utilities
30
31 // Clears browsing history.
32 + (void)clearBrowsingHistory;
33
34 #pragma mark - Navigation Utilities
35
36 // Loads |URL| in the current WebState with transition of type
37 // ui::PAGE_TRANSITION_TYPED, and waits for the page to complete loading, or
38 // a timeout.
39 + (void)loadURL:(GURL)URL;
40
41 // Waits for the page to finish loading or a timeout.
42 + (void)waitForPageToFinishLoading;
43
44 // Taps html element with |elementID| in the current web view.
45 + (void)tapWebViewElementWithID:(NSString*)elementID;
46
47 @end
48
49 #endif // IOS_CHROME_TEST_EARL_GREY_CHROME_EARL_GREY_H_
OLDNEW
« no previous file with comments | « ios/chrome/test/earl_grey/chrome_assertions.mm ('k') | ios/chrome/test/earl_grey/chrome_earl_grey.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698