diff options
author | Kristian Monsen <kristianm@google.com> | 2010-05-26 18:21:39 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2010-05-27 11:09:38 +0100 |
commit | fb4b88fddb95ae37bafb304bec8d7f0a0d447dd9 (patch) | |
tree | 059cf42416ae2819e5b787ebf5b4aaad2748217a /tests/DumpRenderTree | |
parent | ffa5de2e07473e3cdd4c0a1d9a99f30b34567bd4 (diff) | |
download | frameworks_base-fb4b88fddb95ae37bafb304bec8d7f0a0d447dd9.zip frameworks_base-fb4b88fddb95ae37bafb304bec8d7f0a0d447dd9.tar.gz frameworks_base-fb4b88fddb95ae37bafb304bec8d7f0a0d447dd9.tar.bz2 |
Fixes an error when displaying the current layout test index.
This fixes a bug in commit https://android-git.corp.google.com/g/#change,52518.
Updated index to be zero based when passed around and off by one error on
resume. Note that previous commit changes how DumpRenderTree dumps titles.
This might affect the results of layout tests.
Change-Id: I3d6989d71c336f90168e38c994dd36743bda365c
Diffstat (limited to 'tests/DumpRenderTree')
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java | 6 | ||||
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java index 150d65c..a2809c3 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java @@ -154,7 +154,7 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh private String mTestPathPrefix; private boolean mFinished; private int mTestCount; - private int mResumeIndex = 0; + private int mResumeIndex; public LayoutTestsAutoTest() { super(TestShellActivity.class); @@ -189,7 +189,7 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh if (mTestList.elementAt(i).equals(line)) { mTestList = new Vector<String>(mTestList.subList(i+1, mTestList.size())); mTestListIgnoreResult = new Vector<Boolean>(mTestListIgnoreResult.subList(i+1, mTestListIgnoreResult.size())); - mResumeIndex = i; + mResumeIndex = i + 1; break; } } @@ -402,7 +402,7 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh boolean ignoreResult = mTestListIgnoreResult.elementAt(i); FsUtils.updateTestStatus(TEST_STATUS_FILE, s); // Run tests - runTestAndWaitUntilDone(activity, s, runner.mTimeoutInMillis, ignoreResult, i + 1 + mResumeIndex); + runTestAndWaitUntilDone(activity, s, runner.mTimeoutInMillis, ignoreResult, i + mResumeIndex); } FsUtils.updateTestStatus(TEST_STATUS_FILE, "#DONE"); diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java index 553aac6..5b4cf22 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java @@ -174,7 +174,7 @@ public class TestShellActivity extends Activity implements LayoutTestController mSaveImagePath = intent.getStringExtra(SAVE_IMAGE); mTestCount = intent.getIntExtra(TEST_COUNT, 0); mTestIndex = intent.getIntExtra(TEST_INDEX, 0); - setTitle("Test " + mTestIndex + " of " + mTestCount); + setTitle("Test " + (mTestIndex + 1) + " of " + mTestCount); Log.v(LOGTAG, " Loading " + mTestUrl); mWebView.loadUrl(mTestUrl); @@ -574,7 +574,7 @@ public class TestShellActivity extends Activity implements LayoutTestController @Override public void onReceivedTitle(WebView view, String title) { - setTitle("Test " + mTestIndex + " of " + mTestCount + ": "+ title); + setTitle("Test " + (mTestIndex + 1) + " of " + mTestCount + ": "+ title); if (mDumpTitleChanges) { mTitleChanges.append("TITLE CHANGED: "); mTitleChanges.append(title); |