| Index: testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java
|
| diff --git a/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java b/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java
|
| index 6ac7312fad3f422a6fa6bcc1b8acf226d1ae249c..0c5d3e6c08b9fc8244b1295f26adb5f4ed1d7cd7 100644
|
| --- a/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java
|
| +++ b/testing/android/reporter/java/src/org/chromium/test/reporter/TestStatusReporter.java
|
| @@ -24,8 +24,14 @@ public class TestStatusReporter {
|
| "org.chromium.test.reporter.TestStatusReporter.TEST_PASSED";
|
| public static final String ACTION_TEST_FAILED =
|
| "org.chromium.test.reporter.TestStatusReporter.TEST_FAILED";
|
| + public static final String ACTION_TEST_RUN_STARTED =
|
| + "org.chromium.test.reporter.TestStatusReporter.TEST_RUN_STARTED";
|
| + public static final String ACTION_TEST_RUN_FINISHED =
|
| + "org.chromium.test.reporter.TestStatusReporter.TEST_RUN_FINISHED";
|
| public static final String DATA_TYPE_HEARTBEAT = "org.chromium.test.reporter/heartbeat";
|
| public static final String DATA_TYPE_RESULT = "org.chromium.test.reporter/result";
|
| + public static final String EXTRA_PID =
|
| + "org.chromium.test.reporter.TestStatusReporter.PID";
|
| public static final String EXTRA_TEST_CLASS =
|
| "org.chromium.test.reporter.TestStatusReporter.TEST_CLASS";
|
| public static final String EXTRA_TEST_METHOD =
|
| @@ -57,22 +63,18 @@ public class TestStatusReporter {
|
| }
|
|
|
| public void testStarted(String testClass, String testMethod) {
|
| - sendBroadcast(testClass, testMethod, ACTION_TEST_STARTED);
|
| + sendTestBroadcast(testClass, testMethod, ACTION_TEST_STARTED);
|
| }
|
|
|
| public void testPassed(String testClass, String testMethod) {
|
| - sendBroadcast(testClass, testMethod, ACTION_TEST_PASSED);
|
| + sendTestBroadcast(testClass, testMethod, ACTION_TEST_PASSED);
|
| }
|
|
|
| public void testFailed(String testClass, String testMethod) {
|
| - sendBroadcast(testClass, testMethod, ACTION_TEST_FAILED);
|
| + sendTestBroadcast(testClass, testMethod, ACTION_TEST_FAILED);
|
| }
|
|
|
| - public void stopHeartbeat() {
|
| - mKeepBeating.set(false);
|
| - }
|
| -
|
| - private void sendBroadcast(String testClass, String testMethod, String action) {
|
| + private void sendTestBroadcast(String action, String testClass, String testMethod) {
|
| Intent i = new Intent(action);
|
| i.setType(DATA_TYPE_RESULT);
|
| i.putExtra(EXTRA_TEST_CLASS, testClass);
|
| @@ -80,4 +82,23 @@ public class TestStatusReporter {
|
| mContext.sendBroadcast(i);
|
| }
|
|
|
| + public void testRunStarted(int pid) {
|
| + sendTestRunBroadcast(ACTION_TEST_RUN_STARTED, pid);
|
| + }
|
| +
|
| + public void testRunFinished(int pid) {
|
| + sendTestRunBroadcast(ACTION_TEST_RUN_FINISHED, pid);
|
| + }
|
| +
|
| + private void sendTestRunBroadcast(String action, int pid) {
|
| + Intent i = new Intent(action);
|
| + i.setType(DATA_TYPE_RESULT);
|
| + i.putExtra(EXTRA_PID, pid);
|
| + mContext.sendBroadcast(i);
|
| + }
|
| +
|
| + public void stopHeartbeat() {
|
| + mKeepBeating.set(false);
|
| + }
|
| +
|
| }
|
|
|