diff options
author | Steve Block <steveblock@google.com> | 2010-07-12 10:01:50 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-07-12 10:01:50 -0700 |
commit | cefd8d9588230577356d24597acc04ce1e276582 (patch) | |
tree | 77ba1db94d75bb6157fdf5a807a101173bc5e04b /tests/DumpRenderTree | |
parent | 12e807fb676fa0833cc71487b060bedefc89fa19 (diff) | |
parent | a88837573e4b99dafd901cfc36589e3ab9449873 (diff) | |
download | frameworks_base-cefd8d9588230577356d24597acc04ce1e276582.zip frameworks_base-cefd8d9588230577356d24597acc04ce1e276582.tar.gz frameworks_base-cefd8d9588230577356d24597acc04ce1e276582.tar.bz2 |
Merge "Update DumpRenderTree to look in platform/android for Android-specific results"
Diffstat (limited to 'tests/DumpRenderTree')
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java index fabbf89..68d01d4 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java @@ -222,14 +222,22 @@ public class LayoutTestsAutoTest extends ActivityInstrumentationTestCase2<TestSh // The generic result is at <path>/<name>-expected.txt // First try the Android-specific result at // platform/android-<js-engine>/<path>/<name>-expected.txt + // then + // platform/android/<path>/<name>-expected.txt int pos = test.lastIndexOf('.'); if (pos == -1) return null; String genericExpectedResult = test.substring(0, pos) + "-expected.txt"; String androidExpectedResultsDir = "platform/android-" + mJsEngine + "/"; - String androidExpectedResult = - genericExpectedResult.replaceFirst(LAYOUT_TESTS_ROOT, LAYOUT_TESTS_ROOT + androidExpectedResultsDir); + String androidExpectedResult = genericExpectedResult.replaceFirst(LAYOUT_TESTS_ROOT, + LAYOUT_TESTS_ROOT + androidExpectedResultsDir); File f = new File(androidExpectedResult); + if (f.exists()) + return androidExpectedResult; + androidExpectedResultsDir = "platform/android/"; + androidExpectedResult = genericExpectedResult.replaceFirst(LAYOUT_TESTS_ROOT, + LAYOUT_TESTS_ROOT + androidExpectedResultsDir); + f = new File(androidExpectedResult); return f.exists() ? androidExpectedResult : genericExpectedResult; } |