Revert "[ios]Removed usage of iossim in ios/build/bots/scripts/*"

This reverts commit 16469ef3a53c5de12de5a86913fde00b95172b0e.

Reason for revert: The recipe change that stops setting iossim breaks the builder on the beta branch: https://ci.chromium.org/p/chromium/builders/ci-beta/ios-simulator/463

Original change's description:
> [ios]Removed usage of iossim in ios/build/bots/scripts/*
>
> Bug: 1011498
> Change-Id: Ie72335fb20a8ee5c47ba8edaf4ed8299068a7f40
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2067325
> Commit-Queue: Maksym Onufriienko <[email protected]>
> Reviewed-by: Rohit Rao <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#744748}

[email protected],[email protected],[email protected],[email protected]


Bug: 1011498, 1056905
Change-Id: I45689abac093072e819b19d38ed6855309045725
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079521
Reviewed-by: Garrett Beaty <[email protected]>
Commit-Queue: Garrett Beaty <[email protected]>
Cr-Commit-Position: refs/heads/master@{#745312}
diff --git a/ios/build/bots/scripts/test_runner_test.py b/ios/build/bots/scripts/test_runner_test.py
index 16e2353..fef4902d 100755
--- a/ios/build/bots/scripts/test_runner_test.py
+++ b/ios/build/bots/scripts/test_runner_test.py
@@ -161,6 +161,7 @@
     with self.assertRaises(test_runner.AppNotFoundError):
       test_runner.SimulatorTestRunner(
         'fake-app',
+        'fake-iossim',
         'platform',
         'os',
         'xcode-version',
@@ -168,10 +169,26 @@
         'out-dir',
       )
 
+  def test_iossim_not_found(self):
+    """Ensures SimulatorNotFoundError is raised."""
+    self.mock(os.path, 'exists', lambda p: not p.endswith('fake-iossim'))
+
+    with self.assertRaises(test_runner.SimulatorNotFoundError):
+      test_runner.SimulatorTestRunner(
+        'fake-app',
+        'fake-iossim',
+        'iPhone X',
+        '11.4',
+        'xcode-version',
+        'xcode-build',
+        'out-dir',
+      )
+
   def test_init(self):
     """Ensures instance is created."""
     tr = test_runner.SimulatorTestRunner(
         'fake-app',
+        'fake-iossim',
         'iPhone X',
         '11.4',
         'xcode-version',
@@ -200,6 +217,7 @@
 
     tr = test_runner.SimulatorTestRunner(
         'fake-app',
+        'fake-iossim',
         'iPhone X',
         '11.4',
         'xcode-version',
@@ -225,6 +243,7 @@
 
     tr = test_runner.SimulatorTestRunner(
       'fake-app',
+      'fake-iossim',
       'iPhone X',
       '11.4',
       'xcode-version',
@@ -249,6 +268,7 @@
     with self.assertRaises(test_runner.SystemAlertPresentError):
       tr = test_runner.SimulatorTestRunner(
         'fake-app',
+        'fake-iossim',
         'iPhone X',
         '11.4',
         'xcode-version',
@@ -265,6 +285,7 @@
       test_cases."""
     tr = test_runner.SimulatorTestRunner(
       'fake-app',
+      'fake-iossim',
       'iPhone X',
       '11.4',
       'xcode-version',
@@ -338,6 +359,7 @@
 
     tr = test_runner.SimulatorTestRunner(
         'fake-app',
+        'fake-iossim',
         'iPhone X',
         '11.4',
         'xcode-version',