Interface HostActivity.HostedTest
-
- All Known Implementing Classes:
ExoHostedTest
- Enclosing class:
- HostActivity
public static interface HostActivity.HostedTestInterface for tests that run inside of aHostActivity.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanblockUntilStopped(long timeoutMs)Called on the main thread to block until the test has stopped orforceStop()is called.booleanforceStop()Called on the main thread to force stop the test (if it is not stopped already).voidonFinished()Called on the test thread after the test has finished and been stopped.voidonStart(HostActivity host, Surface surface, FrameLayout overlayFrameLayout)Called on the main thread when the test is started.
-
-
-
Method Detail
-
onStart
void onStart(HostActivity host, Surface surface, FrameLayout overlayFrameLayout)
Called on the main thread when the test is started.The test will not be started until the
HostActivityhas been resumed and itsSurfacehas been created.- Parameters:
host- TheHostActivityin which the test is being run.surface- TheSurface.overlayFrameLayout- AFrameLayoutthat is on top of the surface.
-
blockUntilStopped
boolean blockUntilStopped(long timeoutMs)
Called on the main thread to block until the test has stopped orforceStop()is called.- Parameters:
timeoutMs- The maximum time to block in milliseconds.- Returns:
- Whether the test has stopped successful.
-
forceStop
boolean forceStop()
Called on the main thread to force stop the test (if it is not stopped already).- Returns:
- Whether the test was forced stopped.
-
onFinished
void onFinished()
Called on the test thread after the test has finished and been stopped.Implementations may use this method to assert that test criteria were met.
-
-