[Android] Refactor browser test execution. (RELAND)

This is a reland of https://codereview.chromium.org/1165523002/

BUG=472360
[email protected]

Review URL: https://codereview.chromium.org/1173363008

Cr-Commit-Position: refs/heads/master@{#334285}
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 2cff5f2..c69b531 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -27,6 +27,8 @@
 from pylib.device import device_errors
 from pylib.device import device_utils
 from pylib.gtest import gtest_config
+# TODO(jbudorick): Remove this once we stop selectively enabling platform mode.
+from pylib.gtest import gtest_test_instance
 from pylib.gtest import setup as gtest_setup
 from pylib.gtest import test_options as gtest_test_options
 from pylib.linker import setup as linker_setup
@@ -919,6 +921,8 @@
     raise Exception('Failed to reset test server port.')
 
   if command == 'gtest':
+    if args.suite_name[0] in gtest_test_instance.BROWSER_TEST_SUITES:
+      return RunTestsInPlatformMode(args, parser)
     return _RunGTests(args, devices)
   elif command == 'linker':
     return _RunLinkerTests(args, devices)