diff options
author | Steve Block <steveblock@google.com> | 2010-11-09 13:36:43 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-11-09 13:36:43 +0000 |
commit | ca501d20360ffee3a37fc87538daf8281f8a14ed (patch) | |
tree | 434c1bfced5029b1c4b1dfd47181812c4e09b99d /tests/DumpRenderTree2 | |
parent | cda9448206494b67c0812b9591cc066ca070a7a6 (diff) | |
download | frameworks_base-ca501d20360ffee3a37fc87538daf8281f8a14ed.zip frameworks_base-ca501d20360ffee3a37fc87538daf8281f8a14ed.tar.gz frameworks_base-ca501d20360ffee3a37fc87538daf8281f8a14ed.tar.bz2 |
Fix DumpRenderTree2 to not attempt to read expected results over HTTPS
This is required now that we have HTTPS tests in the triaged set of
tests.
Change-Id: I650518a4536ed903f637a44c0901b1e38bdc1a84
Diffstat (limited to 'tests/DumpRenderTree2')
3 files changed, 7 insertions, 6 deletions
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java index 9bbf64a..ebdf9c2 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/FileFilter.java @@ -243,8 +243,7 @@ public class FileFilter { * Currently we run .html and .xhtml tests. * * @param testName - * @return - * if the file is a test + * @return if the file is a test */ public static boolean isTestFile(String testName) { return testName.endsWith(".html") || testName.endsWith(".xhtml"); @@ -254,9 +253,11 @@ public class FileFilter { * Return a URL of the test on the server. * * @param relativePath + * @param allowHttps Whether to allow the use of HTTPS, even if the file is in the SSL + * directory. * @return a URL of the test on the server */ - public static URL getUrl(String relativePath) { + public static URL getUrl(String relativePath, boolean allowHttps) { String urlBase = ForwarderManager.getHostSchemePort(false); /** @@ -265,7 +266,7 @@ public class FileFilter { */ if (relativePath.startsWith(HTTP_TESTS_PATH)) { relativePath = relativePath.substring(HTTP_TESTS_PATH.length()); - if (relativePath.startsWith(SSL_PATH)) { + if (relativePath.startsWith(SSL_PATH) && allowHttps) { urlBase = ForwarderManager.getHostSchemePort(true); } } else { diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java index 58f7183..7efb03f 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/LayoutTestsExecutor.java @@ -439,7 +439,7 @@ public class LayoutTestsExecutor extends Activity { Log.i(LOG_TAG, "runNextTest(): Start: " + mCurrentTestRelativePath + " (" + mCurrentTestIndex + ")"); - mCurrentTestUri = FileFilter.getUrl(mCurrentTestRelativePath).toString(); + mCurrentTestUri = FileFilter.getUrl(mCurrentTestRelativePath, true).toString(); reset(); diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java index 333612e..e4df62d 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/ManagerService.java @@ -262,7 +262,7 @@ public class ManagerService extends Service { int size = EXPECTED_RESULT_LOCATION_RELATIVE_DIR_PREFIXES.size(); for (int i = 0; bytes == null && i < size; i++) { relativePath = locations.get(i) + originalRelativePath; - bytes = FsUtils.readDataFromUrl(FileFilter.getUrl(relativePath)); + bytes = FsUtils.readDataFromUrl(FileFilter.getUrl(relativePath, false)); } mLastExpectedResultPathFetched = bytes == null ? null : relativePath; |