| Index: ios/chrome/test/earl_grey/chrome_earl_grey.mm
 | 
| diff --git a/ios/chrome/test/earl_grey/chrome_earl_grey.mm b/ios/chrome/test/earl_grey/chrome_earl_grey.mm
 | 
| index 970abc0bfd4276df1e472516718046323abc77de..9c7fd8c81688ebc46303c19a20f374fbb6e4a665 100644
 | 
| --- a/ios/chrome/test/earl_grey/chrome_earl_grey.mm
 | 
| +++ b/ios/chrome/test/earl_grey/chrome_earl_grey.mm
 | 
| @@ -21,6 +21,7 @@
 | 
|  #import "ios/chrome/test/app/static_html_view_test_util.h"
 | 
|  #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"
 | 
|  #import "ios/web/public/test/web_view_interaction_test_util.h"
 | 
|  #import "ios/web/public/web_state/js/crw_js_injection_receiver.h"
 | 
|  #import "ios/web/public/web_state/web_state.h"
 | 
| @@ -184,4 +185,14 @@ id ExecuteJavaScript(NSString* javascript,
 | 
|               @"Failed, there was a static html view containing %@", text);
 | 
|  }
 | 
|  
 | 
| ++ (void)waitForWebViewContainingText:(std::string)text {
 | 
| +  GREYCondition* condition = [GREYCondition
 | 
| +      conditionWithName:@"Wait for web view containing text"
 | 
| +                  block:^BOOL {
 | 
| +                    return web::test::IsWebViewContainingText(
 | 
| +                        chrome_test_util::GetCurrentWebState(), text);
 | 
| +                  }];
 | 
| +  GREYAssert([condition waitWithTimeout:testing::kWaitForUIElementTimeout],
 | 
| +             @"Failed waiting for web view containing %s", text.c_str());
 | 
| +}
 | 
|  @end
 | 
| 
 |