summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree2
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-09-17 15:41:11 +0100
committerSteve Block <steveblock@google.com>2010-09-17 16:12:21 +0100
commit76c97ee414dfc752ce26201a440bf7c451acae85 (patch)
treea1f02eb1463fb29473e818b3d1ef18e90c805eb4 /tests/DumpRenderTree2
parent062c0c98469e3322fdc01d88a66c9ef1ae3f829a (diff)
downloadframeworks_base-76c97ee414dfc752ce26201a440bf7c451acae85.zip
frameworks_base-76c97ee414dfc752ce26201a440bf7c451acae85.tar.gz
frameworks_base-76c97ee414dfc752ce26201a440bf7c451acae85.tar.bz2
Fix DumpRenderTree2 to serve HTTP tests on http://127.0.0.1:8000
Currently DumpRenderTree2 serves HTTP tests on http://localhost:8080. Some of the tests hardcode 'http://127.0.0.1:8000' for resources, so we must use this scheme and port for the requests to be same-origin. This fixes LayoutTest http/tests/appcache/credential-url.html Change-Id: I2a9c402fc7b0e0b62eb4a278d67ac0e63ef96e8b
Diffstat (limited to 'tests/DumpRenderTree2')
-rwxr-xr-xtests/DumpRenderTree2/assets/run_apache2.py4
-rw-r--r--tests/DumpRenderTree2/src/com/android/dumprendertree2/forwarder/ForwarderManager.java8
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/DumpRenderTree2/assets/run_apache2.py b/tests/DumpRenderTree2/assets/run_apache2.py
index 6c3b2f2..c799b5c 100755
--- a/tests/DumpRenderTree2/assets/run_apache2.py
+++ b/tests/DumpRenderTree2/assets/run_apache2.py
@@ -75,6 +75,10 @@ def main(options, args):
apache2_restart_template = "apache2 -k %s"
directives = " -c \"ServerRoot " + android_tree_root + "\""
+ # The default config in apache2-debian-httpd.conf listens on ports 8080 and
+ # 8443. We also need to listen on port 8000 for HTTP tests.
+ directives += " -c \"Listen 8000\""
+
# We use http/tests as the document root as the HTTP tests use hardcoded
# resources at the server root. We then use aliases to make available the
# complete set of tests and the required scripts.
diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/forwarder/ForwarderManager.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/forwarder/ForwarderManager.java
index 7317a27..cff436f 100644
--- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/forwarder/ForwarderManager.java
+++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/forwarder/ForwarderManager.java
@@ -40,11 +40,9 @@ public class ForwarderManager {
* We use these ports because other webkit platforms do. They are set up in
* external/webkit/LayoutTests/http/conf/apache2-debian-httpd.conf
*/
- public static final int HTTP_PORT = 8080;
+ public static final int HTTP_PORT = 8000;
public static final int HTTPS_PORT = 8443;
- public static final String HOST = "localhost";
-
private static ForwarderManager forwarderManager;
private Set<Forwarder> mForwarders;
@@ -75,7 +73,7 @@ public class ForwarderManager {
URL url = null;
try {
- url = new URL(protocol, HOST, port, "/");
+ url = new URL(protocol, HOST_IP, port, "/");
} catch (MalformedURLException e) {
assert false : "isHttps=" + isHttps;
}
@@ -122,4 +120,4 @@ public class ForwarderManager {
mIsStarted = false;
Log.i(LOG_TAG, "ForwarderManager stopped.");
}
-} \ No newline at end of file
+}