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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user