Removed unused waitForWebView* methods to chrome_earl_grey.

After downstream switched to new API,
it is safe to remove these methods
Downstream cl:
https://chrome-internal-review.googlesource.com/c/chrome/ios_internal/+/1284395

Bug: 922813
Change-Id: Ic813d77bfc6f6ad192300ced1dee8e8b2f69f36b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1623543
Commit-Queue: Maksym Onufriienko <monufriienko@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662734}
diff --git a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
index 5868228..329b03ec 100644
--- a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
+++ b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
@@ -658,7 +658,7 @@
   CHROME_EG_ASSERT_NO_ERROR([ChromeEarlGrey tapWebStateElementWithID:@"link"]);
 
   CHROME_EG_ASSERT_NO_ERROR(
-      [ChromeEarlGrey waitForWebViewContainingText:"Whee"]);
+      [ChromeEarlGrey waitForWebStateContainingText:"Whee"]);
   NSUInteger tabIndex = [ChromeEarlGrey mainTabCount] - 1;
   CHROME_EG_ASSERT_NO_ERROR([ChromeEarlGrey openNewTab]);
   CHROME_EG_ASSERT_NO_ERROR(OpenNewIncognitoTabUsingUIAndEvictMainTabs());
diff --git a/ios/chrome/browser/ui/browser_view/browser_view_controller_egtest.mm b/ios/chrome/browser/ui/browser_view/browser_view_controller_egtest.mm
index 27f4665..2a2a718d 100644
--- a/ios/chrome/browser/ui/browser_view/browser_view_controller_egtest.mm
+++ b/ios/chrome/browser/ui/browser_view/browser_view_controller_egtest.mm
@@ -179,14 +179,14 @@
   // Load the test page.
   CHROME_EG_ASSERT_NO_ERROR([ChromeEarlGrey loadURL:testURL]);
   CHROME_EG_ASSERT_NO_ERROR(
-      [ChromeEarlGrey waitForWebViewContainingText:testPageContents]);
+      [ChromeEarlGrey waitForWebStateContainingText:testPageContents]);
   web::WebState* firstWebState = chrome_test_util::GetCurrentTab().webState;
 
   // And do the same in a second tab.
   CHROME_EG_ASSERT_NO_ERROR([ChromeEarlGrey openNewTab]);
   CHROME_EG_ASSERT_NO_ERROR([ChromeEarlGrey loadURL:testURL]);
   CHROME_EG_ASSERT_NO_ERROR(
-      [ChromeEarlGrey waitForWebViewContainingText:testPageContents]);
+      [ChromeEarlGrey waitForWebStateContainingText:testPageContents]);
   web::WebState* secondWebState = chrome_test_util::GetCurrentTab().webState;
 
   // Check visibility before and after switching tabs.
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_egtest.mm b/ios/chrome/browser/ui/reading_list/reading_list_egtest.mm
index aab2c1e..8ed23ad 100644
--- a/ios/chrome/browser/ui/reading_list/reading_list_egtest.mm
+++ b/ios/chrome/browser/ui/reading_list/reading_list_egtest.mm
@@ -434,7 +434,7 @@
   // There will be multiple reloads, wait for the page to be displayed.
   if (online) {
     // Due to the reloads, a timeout longer than what is provided in
-    // [ChromeEarlGrey waitForWebViewContainingText] is required, so call
+    // [ChromeEarlGrey waitForWebStateContainingText] is required, so call
     // WebViewContainingText directly.
     GREYAssert(base::test::ios::WaitUntilConditionOrTimeout(
                    kLoadOfflineTimeout,
diff --git a/ios/chrome/browser/web/tab_order_egtest.mm b/ios/chrome/browser/web/tab_order_egtest.mm
index 8f225e4..93c5922 100644
--- a/ios/chrome/browser/web/tab_order_egtest.mm
+++ b/ios/chrome/browser/web/tab_order_egtest.mm
@@ -60,7 +60,7 @@
   // Create a tab that will act as the parent tab.
   CHROME_EG_ASSERT_NO_ERROR([ChromeEarlGrey loadURL:URL1]);
   CHROME_EG_ASSERT_NO_ERROR(
-      [ChromeEarlGrey waitForWebViewContainingText:kLinksTestURL1Text]);
+      [ChromeEarlGrey waitForWebStateContainingText:kLinksTestURL1Text]);
   Tab* parentTab = chrome_test_util::GetCurrentTab();
 
   // Child tab should be inserted after the parent.
@@ -90,13 +90,13 @@
   const GURL URL2 = self.testServer->GetURL(kLinksTestURL2);
   CHROME_EG_ASSERT_NO_ERROR([ChromeEarlGrey loadURL:URL2]);
   CHROME_EG_ASSERT_NO_ERROR(
-      [ChromeEarlGrey waitForWebViewContainingText:kLinksTestURL2Text]);
+      [ChromeEarlGrey waitForWebStateContainingText:kLinksTestURL2Text]);
   GREYAssertEqual(3U, [ChromeEarlGrey mainTabCount],
                   @"Unexpected number of tabs");
 
   CHROME_EG_ASSERT_NO_ERROR([ChromeEarlGrey loadURL:URL1]);
   CHROME_EG_ASSERT_NO_ERROR(
-      [ChromeEarlGrey waitForWebViewContainingText:kLinksTestURL1Text]);
+      [ChromeEarlGrey waitForWebStateContainingText:kLinksTestURL1Text]);
   GREYAssertEqual(3U, [ChromeEarlGrey mainTabCount],
                   @"Unexpected number of tabs");
 
diff --git a/ios/chrome/test/earl_grey/chrome_earl_grey.h b/ios/chrome/test/earl_grey/chrome_earl_grey.h
index 6cbc0bc..1379c07f 100644
--- a/ios/chrome/test/earl_grey/chrome_earl_grey.h
+++ b/ios/chrome/test/earl_grey/chrome_earl_grey.h
@@ -130,9 +130,6 @@
 // Closes the current tab and waits for the UI to complete.
 - (void)closeCurrentTab;
 
-// Taps html element with |elementID| in the current web view.
-- (NSError*)tapWebViewElementWithID:(NSString*)elementID WARN_UNUSED_RESULT;
-
 // Waits for a static html view containing |text|. If the condition is not met
 // within a timeout, a GREYAssert is induced.
 // TODO(crbug.com/963613): Change return type to void when
@@ -174,39 +171,6 @@
 - (NSError*)waitForSufficientlyVisibleElementWithMatcher:
     (id<GREYMatcher>)matcher WARN_UNUSED_RESULT;
 
-#pragma mark - WebView Utilities to not break downstream builds.
-
-// Remove methods below since a cl below will be submitted
-// https://chrome-internal-review.googlesource.com/c/chrome/ios_internal/+/1284395
-
-// Waits for the matcher to return an element that is sufficiently visible.
-- (NSError*)waitForElementWithMatcherSufficientlyVisible:
-    (id<GREYMatcher>)matcher WARN_UNUSED_RESULT;
-
-// Waits for the current web state to contain |text|. Returns nil if the
-// condition is met within a timeout, otherwise an NSError indicating why the
-// operation failed.
-- (NSError*)waitForWebViewContainingText:(std::string)text WARN_UNUSED_RESULT;
-
-// Waits for there to be no web state containing |text|.
-// If the condition is not met within a timeout returns an NSError indicating
-// why the operation failed, otherwise nil.
-- (NSError*)waitForWebViewNotContainingText:(std::string)text
-    WARN_UNUSED_RESULT;
-
-// Taps html element with |elementID| in the current web state.
-- (NSError*)tapWebViewElementWithID:(NSString*)elementID WARN_UNUSED_RESULT;
-
-// Waits for there to be a web state containing loaded image with |image_id|.
-// When loaded, the image element will have the same size as actual image.
-- (NSError*)waitForWebViewContainingLoadedImageElementWithID:
-    (std::string)imageID WARN_UNUSED_RESULT;
-
-// Waits for there to be a web state containing a blocked |image_id|.  When
-// blocked, the image element will be smaller than the actual image size.
-- (NSError*)waitForWebViewContainingBlockedImageElementWithID:
-    (std::string)imageID WARN_UNUSED_RESULT;
-
 #pragma mark - WebState Utilities
 
 // Taps html element with |elementID| in the current web state.
diff --git a/ios/chrome/test/earl_grey/chrome_earl_grey.mm b/ios/chrome/test/earl_grey/chrome_earl_grey.mm
index 1751dc0..a268792 100644
--- a/ios/chrome/test/earl_grey/chrome_earl_grey.mm
+++ b/ios/chrome/test/earl_grey/chrome_earl_grey.mm
@@ -452,38 +452,6 @@
   return nil;
 }
 
-#pragma mark - WebState Utilities to not break downstream builds.
-
-// Remove methods below since a cl below will be submitted
-// https://chrome-internal-review.googlesource.com/c/chrome/ios_internal/+/1284395
-
-- (NSError*)waitForElementWithMatcherSufficientlyVisible:
-    (id<GREYMatcher>)matcher {
-  return [self waitForSufficientlyVisibleElementWithMatcher:matcher];
-}
-
-- (NSError*)waitForWebViewContainingText:(std::string)text {
-  return [self waitForWebStateContainingText:text];
-}
-
-- (NSError*)waitForWebViewNotContainingText:(std::string)text {
-  return [self waitForWebStateNotContainingText:text];
-}
-
-- (NSError*)tapWebViewElementWithID:(NSString*)elementID {
-  return [self tapWebStateElementWithID:elementID];
-}
-
-- (NSError*)waitForWebViewContainingLoadedImageElementWithID:
-    (std::string)imageID {
-  return [self waitForWebStateContainingLoadedImageElementWithID:imageID];
-}
-
-- (NSError*)waitForWebViewContainingBlockedImageElementWithID:
-    (std::string)imageID {
-  return [self waitForWebStateContainingBlockedImageElementWithID:imageID];
-}
-
 #pragma mark - Sync Utilities
 
 - (void)clearSyncServerData {