| OLD | NEW |
| 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 #ifndef IOS_WEB_SHELL_TEST_EARL_GREY_SHELL_EARL_GREY_H_ | 5 #ifndef IOS_WEB_SHELL_TEST_EARL_GREY_SHELL_EARL_GREY_H_ |
| 6 #define IOS_WEB_SHELL_TEST_EARL_GREY_SHELL_EARL_GREY_H_ | 6 #define IOS_WEB_SHELL_TEST_EARL_GREY_SHELL_EARL_GREY_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| 11 | 11 |
| 12 // Test methods that perform actions on Web Shell. These methods may read or | 12 // Test methods that perform actions on Web Shell. These methods may read or |
| 13 // alter Web Shell's internal state programmatically or via the UI, but in both | 13 // alter Web Shell's internal state programmatically or via the UI, but in both |
| 14 // cases will properly synchronize the UI for Earl Grey tests. | 14 // cases will properly synchronize the UI for Earl Grey tests. |
| 15 @interface ShellEarlGrey : NSObject | 15 @interface ShellEarlGrey : NSObject |
| 16 | 16 |
| 17 // Loads |URL| in the current WebState with transition of type | 17 // Loads |URL| in the current WebState with transition of type |
| 18 // ui::PAGE_TRANSITION_TYPED, and waits for the page to complete loading, or | 18 // ui::PAGE_TRANSITION_TYPED, and waits for the page to complete loading, or |
| 19 // a timeout. | 19 // a timeout. |
| 20 + (void)loadURL:(const GURL&)URL; | 20 + (void)loadURL:(const GURL&)URL; |
| 21 | 21 |
| 22 // Waits for the current web view to contain |text|. If the condition is not met |
| 23 // within a timeout, a GREYAssert is induced. |
| 24 + (void)waitForWebViewContainingText:(const std::string)text; |
| 25 |
| 22 @end | 26 @end |
| 23 | 27 |
| 24 #endif // IOS_WEB_SHELL_TEST_EARL_GREY_SHELL_EARL_GREY_H_ | 28 #endif // IOS_WEB_SHELL_TEST_EARL_GREY_SHELL_EARL_GREY_H_ |
| OLD | NEW |