First time, it takes several minutes as it packs dependencies (including browser_tests binary) and copies them to the VM. From the second time, you can make it faster by adding skip_deps to --args:
Once you fix the test in Chrome tree, run the following to rebuild Chrome as well as the tests. Note that you should set CHROME_ORIGIN=LOCAL_SOURCE to build Chrome from your local tree.
./run_remote_tests.sh --use_emerged --remote localhost --ssh_port 9222 desktopui_BrowserTest.control.custom --args 'gtest_filter=EnterpriseMetricsTest.DevicePolicyStoreSuccess'
Be sure NOT to add 'skip_deps' here. You need to reprocess the dependencies so the new browser_tests binary gets copied to the VM.
Want to see symbolized crash dump from CHECK failures?
The test binaries copied to VM have no symbol information attached. Hence you'll only see raw addresses from CHECK failures, like:
[13506:13506:1228/104116:61846195821:FATAL:dbus_thread_manager.cc(176)] Check failed: g_dbus_thread_manager. DBusThreadManager::Get() called before Initialize()
To see symbolized crash dump, you need to take extra steps (we should make it easier though):
USE="build_tests chrome_debug_tests" emerge-x86-generic chromeos-chrome
cp /var/lib/portage/distfiles-target/chrome-src/src/out_x86-generic/Release/browser_tests .
strip --strip-debug browser_tests # this step is optional see below.
scp -P 9222 browser_tests root@localhost:/usr/local/autotest/deps/chrome_test/test_src/out/Release/browser_tests
./run_remote_tests.sh --use_emerged --remote localhost --ssh_port 9222 desktopui_BrowserTest.control.custom --args 'skip_deps gtest_filter=EnterpriseMetricsTest.DevicePolicyStoreSuccess'
With chrome_debug_tests, you'll have unstripped binaries in /var/lib/portage/distfiles-target/chrome-src/src/out_x86-generic/Release. An unstripped browser_tests can be as big as 900MB. If you are only interested in symbol names, not detailed debug info, you can strip the debug info but keep the symbol names, which results in a binary of 100MB, to make copying the file to VM faster.
Be sure to add 'skip_deps' here. Otherwise, autotest will overwrite browser_tests again.
Trouble Shooting
If you set USE=-build_tests in the chroot, you may encounter the following error when running run_remote_tests.
ERROR : Cannot find match for "desktopui_BrowserTest.control.custom"
If you see the error, just run the following in the chroot.
USE="build_tests" emerge-x86-generic chromeos-chrome
This will build browser_tests and other files which are necessary to run tests on VM.