| Index: ios/chrome/browser/web/window_open_by_dom_egtest.mm
 | 
| diff --git a/ios/chrome/browser/web/window_open_by_dom_egtest.mm b/ios/chrome/browser/web/window_open_by_dom_egtest.mm
 | 
| index fbfe60f2b2323bfc7548f35ba4b82107a5716de9..8ac49f6708df115b159a056eb97a6ce21b3407e8 100644
 | 
| --- a/ios/chrome/browser/web/window_open_by_dom_egtest.mm
 | 
| +++ b/ios/chrome/browser/web/window_open_by_dom_egtest.mm
 | 
| @@ -29,7 +29,6 @@
 | 
|  using chrome_test_util::AssertMainTabCount;
 | 
|  using chrome_test_util::OmniboxText;
 | 
|  using chrome_test_util::TapWebViewElementWithId;
 | 
| -using chrome_test_util::WebViewContainingText;
 | 
|  using web::test::HttpServer;
 | 
|  
 | 
|  namespace {
 | 
| @@ -66,8 +65,7 @@ NSString* GetBlockedPopupInfobarText(size_t blocked_count) {
 | 
|    [super setUp];
 | 
|    // Open the test page. There should only be one tab open.
 | 
|    [ChromeEarlGrey loadURL:HttpServer::MakeUrl(kTestURL)];
 | 
| -  [[EarlGrey selectElementWithMatcher:WebViewContainingText("Expected result")]
 | 
| -      assertWithMatcher:grey_notNil()];
 | 
| +  [ChromeEarlGrey waitForWebViewContainingText:"Expected result"];
 | 
|    AssertMainTabCount(1);
 | 
|  }
 | 
|  
 | 
| @@ -89,8 +87,7 @@ NSString* GetBlockedPopupInfobarText(size_t blocked_count) {
 | 
|  
 | 
|    TapWebViewElementWithId("webScenarioWindowOpenSameURLWithBlankTarget");
 | 
|    AssertMainTabCount(2);
 | 
| -  [[EarlGrey selectElementWithMatcher:WebViewContainingText("Expected result")]
 | 
| -      assertWithMatcher:grey_notNil()];
 | 
| +  [ChromeEarlGrey waitForWebViewContainingText:"Expected result"];
 | 
|  
 | 
|    id value = ExecuteJavaScript(@"sessionStorage.getItem('key');", &error);
 | 
|    GREYAssert(!error, @"Error during script execution: %@", error);
 | 
| 
 |