зеркало из https://github.com/mozilla/pjs.git
Bug 405570 - Replace redirects in test for bug 403331 with a test-specific redirection page, now that the HTTP server supports server-side scripts -- the less test harness infrastructure we have, the easier it is to understand and support. r=me as a trivial change, a=testonlychange
This commit is contained in:
Родитель
9b5e46503a
Коммит
3bfed4504a
|
@ -48,6 +48,7 @@ _TEST_FILES = \
|
|||
test_bug403331.html \
|
||||
bug403331.zip \
|
||||
bug403331.zip^headers^ \
|
||||
openredirect.sjs \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
function handleRequest(request, response)
|
||||
{
|
||||
response.setStatusLine(request.httpVersion, 301, "Moved Permanently");
|
||||
response.setHeader("Location", request.queryString, false);
|
||||
}
|
|
@ -34,7 +34,7 @@ function runTest() {
|
|||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
testFrame.src = "jar:http://example.org:80/redirect?http://localhost:8888/tests/modules/libjar/test/mochitest/bug403331.zip!/test.html";
|
||||
testFrame.src = "jar:http://example.org:80/tests/modules/libjar/test/mochitest/openredirect.sjs?http://localhost:8888/tests/modules/libjar/test/mochitest/bug403331.zip!/test.html";
|
||||
}
|
||||
|
||||
addLoadEvent(runTest);
|
||||
|
|
|
@ -139,8 +139,6 @@ function runServer()
|
|||
|
||||
server.registerPathHandler("/server/shutdown", serverShutdown);
|
||||
|
||||
server.registerPathHandler("/redirect", redirect);
|
||||
|
||||
server.registerContentType("sjs", "sjs"); // .sjs == CGI-like functionality
|
||||
|
||||
server.setIndexHandler(defaultDirHandler);
|
||||
|
@ -200,12 +198,6 @@ function serverShutdown(metadata, response)
|
|||
server.stop();
|
||||
}
|
||||
|
||||
function redirect(metadata, response)
|
||||
{
|
||||
response.setStatusLine("1.1", 301, "Moved Permanently");
|
||||
response.setHeader("Location", metadata.queryString, false);
|
||||
}
|
||||
|
||||
//
|
||||
// DIRECTORY LISTINGS
|
||||
//
|
||||
|
|
Загрузка…
Ссылка в новой задаче