[IOS] Move ios/testing/wait_util.* to base/test/ios/wait_util.* (cleanup)

Cleans up //ios/testing:ios_test_support that had been kept around to avoid
breaking ios downstream

Bug: 784735
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ib07bf8aa8d5e70a1980c2517fb3dbe709467c5a5
Reviewed-on: https://chromium-review.googlesource.com/1136903
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576937}
diff --git a/components/autofill/ios/form_util/BUILD.gn b/components/autofill/ios/form_util/BUILD.gn
index 3b0c7ee8..30daeef 100644
--- a/components/autofill/ios/form_util/BUILD.gn
+++ b/components/autofill/ios/form_util/BUILD.gn
@@ -56,7 +56,6 @@
     "//ios/chrome/browser/browser_state:test_support",
     "//ios/chrome/browser/tabs:tabs_internal",
     "//ios/chrome/browser/web:test_support",
-    "//ios/testing:ios_test_support",
     "//ios/web/public/test",
     "//ios/web/public/test/fakes",
     "//ios/web/web_state/js",
diff --git a/ios/testing/BUILD.gn b/ios/testing/BUILD.gn
index 21e18e0..1c40926 100644
--- a/ios/testing/BUILD.gn
+++ b/ios/testing/BUILD.gn
@@ -12,20 +12,6 @@
   ]
 }
 
-source_set("ios_test_support") {
-  configs += [ "//build/config/compiler:enable_arc" ]
-  testonly = true
-
-  deps = [
-    "//base/test:test_support",
-  ]
-
-  sources = [
-    "wait_util.h",
-    "wait_util.mm",
-  ]
-}
-
 source_set("embedded_test_server_support") {
   configs += [ "//build/config/compiler:enable_arc" ]
   testonly = true
diff --git a/ios/testing/wait_util.h b/ios/testing/wait_util.h
deleted file mode 100644
index 2c4504c..0000000
--- a/ios/testing/wait_util.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef IOS_TESTING_WAIT_UTIL_H_
-#define IOS_TESTING_WAIT_UTIL_H_
-
-#import <Foundation/Foundation.h>
-
-#include "base/compiler_specific.h"
-#import "base/ios/block_types.h"
-
-namespace testing {
-
-// Constant for UI wait loop in seconds.
-extern const NSTimeInterval kSpinDelaySeconds;
-
-// Constant for timeout in seconds while waiting for UI element.
-extern const NSTimeInterval kWaitForUIElementTimeout;
-
-// Constant for timeout in seconds while waiting for JavaScript completion.
-extern const NSTimeInterval kWaitForJSCompletionTimeout;
-
-// Constant for timeout in seconds while waiting for a download to complete.
-extern const NSTimeInterval kWaitForDownloadTimeout;
-
-// Constant for timeout in seconds while waiting for a pageload to complete.
-extern const NSTimeInterval kWaitForPageLoadTimeout;
-
-// Constant for timeout in seconds while waiting for a generic action to
-// complete.
-extern const NSTimeInterval kWaitForActionTimeout;
-
-// Constant for timeout in seconds while waiting for cookies operations to
-// complete.
-extern const NSTimeInterval kWaitForCookiesTimeout;
-
-// Constant for timeout in seconds while waiting for a file operation to
-// complete.
-extern const NSTimeInterval kWaitForFileOperationTimeout;
-
-// Returns true when condition() becomes true, otherwise returns false after
-// |timeout|.
-bool WaitUntilConditionOrTimeout(NSTimeInterval timeout,
-                                 ConditionBlock condition) WARN_UNUSED_RESULT;
-
-}  // namespace testing
-
-#endif  // IOS_TESTING_WAIT_UTIL_H_
diff --git a/ios/testing/wait_util.mm b/ios/testing/wait_util.mm
deleted file mode 100644
index 8ab49ec..0000000
--- a/ios/testing/wait_util.mm
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "ios/testing/wait_util.h"
-
-#import "base/test/ios/wait_util.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-namespace testing {
-
-const NSTimeInterval kSpinDelaySeconds = 0.01;
-const NSTimeInterval kWaitForJSCompletionTimeout = 4.0;
-const NSTimeInterval kWaitForUIElementTimeout = 4.0;
-const NSTimeInterval kWaitForDownloadTimeout = 10.0;
-const NSTimeInterval kWaitForPageLoadTimeout = 10.0;
-const NSTimeInterval kWaitForActionTimeout = 10.0;
-const NSTimeInterval kWaitForCookiesTimeout = 4.0;
-const NSTimeInterval kWaitForFileOperationTimeout = 2.0;
-
-bool WaitUntilConditionOrTimeout(NSTimeInterval timeout,
-                                 ConditionBlock condition) {
-  NSDate* deadline = [NSDate dateWithTimeIntervalSinceNow:timeout];
-  bool success = condition();
-  while (!success && [[NSDate date] compare:deadline] != NSOrderedDescending) {
-    base::test::ios::SpinRunLoopWithMaxDelay(
-        base::TimeDelta::FromSecondsD(testing::kSpinDelaySeconds));
-    success = condition();
-  }
-  return success;
-}
-
-}  // namespace testing