Improve logging in ScrollCaptureFrameworkSmokeTest
In the event of failure, this change prints some very useful information such as, why no connection was returned and potentially the name of the window which was investigated. Bug: 184117155 Test: atest ScrollCaptureFrameworkSmokeTest Change-Id: Iecf5ef2d22d00773a08d0b2605391a4db0be9b21
This commit is contained in:
@@ -82,7 +82,11 @@ public class ScrollCaptureFrameworkSmokeTest extends SysuiTestCase {
|
||||
latch.await(1000, TimeUnit.MILLISECONDS);
|
||||
|
||||
assertNotNull(mResponse);
|
||||
assertTrue(mResponse.isConnected());
|
||||
assertTrue(mResponse.getWindowTitle().contains(ScrollViewActivity.class.getSimpleName()));
|
||||
if (!mResponse.isConnected()) {
|
||||
Log.e(TAG, "Received response with no connection: " + mResponse);
|
||||
fail("expected response.isConnected() == true");
|
||||
}
|
||||
assertTrue("expected a connection to ScrollViewActivity",
|
||||
mResponse.getWindowTitle().contains(ScrollViewActivity.class.getSimpleName()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user