| Index: ios/web/shell/test/context_menu_egtest.mm
 | 
| diff --git a/ios/web/shell/test/context_menu_egtest.mm b/ios/web/shell/test/context_menu_egtest.mm
 | 
| index bc1e69e02c2ec77b78dd8450662188887c924f2a..3c19a9f31622d241705d6fab91e13bf944ab101a 100644
 | 
| --- a/ios/web/shell/test/context_menu_egtest.mm
 | 
| +++ b/ios/web/shell/test/context_menu_egtest.mm
 | 
| @@ -26,7 +26,6 @@
 | 
|  
 | 
|  using testing::ContextMenuItemWithText;
 | 
|  using testing::ElementToDismissContextMenu;
 | 
| -using web::WebViewContainingText;
 | 
|  
 | 
|  // Context menu test cases for the web shell.
 | 
|  @interface ContextMenuTestCase : WebShellTestCase
 | 
| @@ -52,8 +51,7 @@ using web::WebViewContainingText;
 | 
|  
 | 
|    web::test::SetUpSimpleHttpServer(responses);
 | 
|    [ShellEarlGrey loadURL:initialURL];
 | 
| -  [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
 | 
| -      assertWithMatcher:grey_notNil()];
 | 
| +  [ShellEarlGrey waitForWebViewContainingText:linkText];
 | 
|  
 | 
|    [[EarlGrey selectElementWithMatcher:web::WebView()]
 | 
|        performAction:web::LongPressElementForContextMenu(
 | 
| @@ -92,8 +90,7 @@ using web::WebViewContainingText;
 | 
|  
 | 
|    web::test::SetUpSimpleHttpServer(responses);
 | 
|    [ShellEarlGrey loadURL:initialURL];
 | 
| -  [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
 | 
| -      assertWithMatcher:grey_notNil()];
 | 
| +  [ShellEarlGrey waitForWebViewContainingText:linkText];
 | 
|  
 | 
|    [[EarlGrey selectElementWithMatcher:web::WebView()]
 | 
|        performAction:web::LongPressElementForContextMenu(
 | 
| @@ -126,8 +123,7 @@ using web::WebViewContainingText;
 | 
|  
 | 
|    web::test::SetUpSimpleHttpServer(responses);
 | 
|    [ShellEarlGrey loadURL:initialURL];
 | 
| -  [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
 | 
| -      assertWithMatcher:grey_notNil()];
 | 
| +  [ShellEarlGrey waitForWebViewContainingText:linkText];
 | 
|  
 | 
|    [[EarlGrey selectElementWithMatcher:web::WebView()]
 | 
|        performAction:web::LongPressElementForContextMenu(
 | 
| @@ -161,8 +157,7 @@ using web::WebViewContainingText;
 | 
|  
 | 
|    web::test::SetUpSimpleHttpServer(responses);
 | 
|    [ShellEarlGrey loadURL:initialURL];
 | 
| -  [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
 | 
| -      assertWithMatcher:grey_notNil()];
 | 
| +  [ShellEarlGrey waitForWebViewContainingText:linkText];
 | 
|  
 | 
|    [[EarlGrey selectElementWithMatcher:web::WebView()]
 | 
|        performAction:web::LongPressElementForContextMenu(
 | 
| 
 |