Commit 0a5b0867 authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Android: Add logging for test dummy

This makes it easier to grep for TestDummyImpl results without requiring
physical access to the test device.

Bug: None
Change-Id: I35efca8d54a7fec9385262ca4bc6908b8692115d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1835706
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702163}
parent 84c273ae
......@@ -56,12 +56,14 @@ public class TestDummyImpl implements TestDummy {
}
private void showDoneDialog(Activity activity, @TestCase int testCase, boolean pass) {
String message = "Test Case %d: " + (pass ? "pass" : "fail");
String message =
String.format(Locale.US, "Test Case %d: %s", testCase, pass ? "pass" : "fail");
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle("Test Dummy Result");
builder.setMessage(String.format(Locale.US, message, testCase));
builder.setMessage(message);
builder.setCancelable(true);
builder.create().show();
Log.i(TAG, message); // Useful for local testing and grepping.
}
private void executeJava(Activity activity) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment