diff options
author | Steve Block <steveblock@google.com> | 2010-09-29 12:55:53 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-29 18:51:42 +0100 |
commit | f460dd42190ada4a2c147db5127a9d7870fe0101 (patch) | |
tree | 2456533409287e69ae3f2eadf706541df9a65c6a /tests/DumpRenderTree2 | |
parent | fdffee828cea81bf2a004e4e2a391e32f59c2f0c (diff) | |
download | frameworks_base-f460dd42190ada4a2c147db5127a9d7870fe0101.zip frameworks_base-f460dd42190ada4a2c147db5127a9d7870fe0101.tar.gz frameworks_base-f460dd42190ada4a2c147db5127a9d7870fe0101.tar.bz2 |
Fix a bug with the expected result path in DumpRenderTree2
If we fail to read from any of the possible expected result paths, we should
not record an expected result path.
Change-Id: Ica96b791c14a7755154be4ec9480be4d13f47a19
Diffstat (limited to 'tests/DumpRenderTree2')
-rw-r--r-- | tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java | 2 | ||||
-rw-r--r-- | tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java index 17e19d0..f42dc86 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java @@ -267,7 +267,7 @@ public class ManagerService extends Service { bytes = FsUtils.readDataFromUrl(FileFilter.getUrl(relativePath)); } - mLastExpectedResultPathFetched = relativePath; + mLastExpectedResultPathFetched = bytes == null ? null : relativePath; return bytes; } diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java index 25c5ad5..8d01a53 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java @@ -539,7 +539,11 @@ public class Summarizer { String textSource = result.getExpectedTextResultPath(); String imageSource = result.getExpectedImageResultPath(); - if (textSource != null) { + if (textSource == null) { + // Show if a text result is missing. We may want to revisit this decision when we add + // support for image results. + html.append("<span class=\"source\">Expected textual result missing</span>"); + } else { html.append("<span class=\"source\">Expected textual result from: "); html.append("<a href=\"" + ForwarderManager.getHostSchemePort(false) + "LayoutTests/" + textSource + "\""); |