| Index: ios/web/shell/test/earl_grey/shell_earl_grey.mm
|
| diff --git a/ios/web/shell/test/earl_grey/shell_earl_grey.mm b/ios/web/shell/test/earl_grey/shell_earl_grey.mm
|
| index bdf8f1b47face21f3577251265b48677eb79864c..45749b8a09c94fe8715cdd80d5d7f10eed9cbb25 100644
|
| --- a/ios/web/shell/test/earl_grey/shell_earl_grey.mm
|
| +++ b/ios/web/shell/test/earl_grey/shell_earl_grey.mm
|
| @@ -8,6 +8,7 @@
|
|
|
| #import "ios/testing/wait_util.h"
|
| #import "ios/web/public/test/earl_grey/js_test_util.h"
|
| +#import "ios/web/public/test/web_view_content_test_util.h"
|
| #include "ios/web/shell/test/app/navigation_test_util.h"
|
| #import "ios/web/shell/test/app/web_shell_test_util.h"
|
|
|
| @@ -40,4 +41,15 @@
|
| [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
|
| }
|
|
|
| ++ (void)waitForWebViewContainingText:(std::string)text {
|
| + GREYCondition* condition = [GREYCondition
|
| + conditionWithName:@"Wait for web view containing text"
|
| + block:^BOOL {
|
| + return web::test::WebViewContainingText(
|
| + web::shell_test_util::GetCurrentWebState(), text);
|
| + }];
|
| + GREYAssert([condition waitWithTimeout:testing::kWaitForUIElementTimeout],
|
| + @"Failed waiting for web view containing %s", text.c_str());
|
| +}
|
| +
|
| @end
|
|
|