public boolean waitForResume(int timeoutMillis) {
        assert Thread.currentThread() != Looper.getMainLooper().getThread() : "Deadlock!";
        try {
            return mResumeLatch.await(timeoutMillis, TimeUnit.MILLISECONDS);
        } catch (InterruptedException e) {
            return false;
        }
    }
Waits until onResume. Returns whether has reached onResume until timeout.
If already resumed, returns "true" immediately.
customtabs/tests/src/android/support/customtabs/trusted/TestBrowser.java