[Android] Refactor the httpd webserver starting logic to make it generalizable



8 years ago
6 months ago


(Reporter: cmtalbert, Assigned: gbrown)


Firefox Tracking Flags

(Not tracked)




8 years ago
We need a better way to share the logic of starting and stopping the httpd webserver that so many use.  In bug 580418, I have a way to port the "mochitest method" to reftest, but that's really overkill.  Furthermore, it doesn't address the needs of specific reftests that want to start httpd on their own for detailed testing.  

Joel and I were talking about creating a mechanism to run httpd.js and use a sjs handler to enable the tests that need httpd support to signal that handler and then have httpd behave as they expect it to.  This bug is where we'll flesh out the details of that design.  We'll need this to support these reftests as well as remoting the large body of reftests.  We'll also need this for xpcshell on android.

When this lands, we should also remove server.js and server-locations.txt from the reftest makefile - layout/tools/reftest/Makefile.in as that overhead will no longer be necessary.
One thing we could do is just modify reftest to make httpd.js always serve from the root of the srcdir, and modify tests to use srcdir-relative paths. So a test in layout/foo that wanted to load a.jpg would have to reference it as layout/foo/a.jpg. Then we could modify the test manifests and just drop the path bit from the HTTP modifier. Then it shouldn't matter if you serve the tests over HTTP or not. (I guess we'd have to modify some reftests to make them all use srcdir-relative paths for files they reference, which is unfortunate.)
Assignee: nobody → gbrown
Last Resolved: 6 months ago
Resolution: --- → WONTFIX
Component: New Frameworks → General
Product: Testing → Testing
You need to log in before you can comment on or make changes to this bug.