Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24652bc9 authored by Steve Block's avatar Steve Block
Browse files

Fix DumpRenderTree2 to correctly handle crashed tests

Change-Id: I894987d5b8f24ea31893aefe3cb6450c2736aa90
parent fc16915d
Loading
Loading
Loading
Loading
+12 −9
Original line number Original line Diff line number Diff line
@@ -404,23 +404,26 @@ public class LayoutTestsExecutor extends Activity {
    }
    }


    private void startTests() {
    private void startTests() {
        if (mCurrentTestIndex == 0) {
            sendFirstTestMessage();
        }

        runNextTest();
    }

    private void sendFirstTestMessage() {
        try {
        try {
            Message serviceMsg =
            Message serviceMsg = Message.obtain(null, ManagerService.MSG_FIRST_TEST);
                    Message.obtain(null, ManagerService.MSG_FIRST_TEST);


            Bundle bundle = new Bundle();
            Bundle bundle = new Bundle();
            if (!mTestsList.isEmpty()) {
            bundle.putString("firstTest", mTestsList.get(0));
            bundle.putString("firstTest", mTestsList.get(0));
            bundle.putInt("index", mCurrentTestIndex);
            bundle.putInt("index", mCurrentTestIndex);
            }


            serviceMsg.setData(bundle);
            serviceMsg.setData(bundle);
            mManagerServiceMessenger.send(serviceMsg);
            mManagerServiceMessenger.send(serviceMsg);
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            Log.e(LOG_TAG, "mCurrentTestRelativePath=" + mCurrentTestRelativePath, e);
            Log.e(LOG_TAG, "Error sending message to manager service:", e);
        }
        }

        runNextTest();
    }
    }


    private void runNextTest() {
    private void runNextTest() {
+5 −0
Original line number Original line Diff line number Diff line
@@ -539,6 +539,11 @@ public class Summarizer {
        String textSource = result.getExpectedTextResultPath();
        String textSource = result.getExpectedTextResultPath();
        String imageSource = result.getExpectedImageResultPath();
        String imageSource = result.getExpectedImageResultPath();


        if (result.didCrash()) {
            html.append("<span class=\"source\">Did not look for expected results</span>");
            return;
        }

        if (textSource == null) {
        if (textSource == null) {
            // Show if a text result is missing. We may want to revisit this decision when we add
            // Show if a text result is missing. We may want to revisit this decision when we add
            // support for image results.
            // support for image results.