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:
jwalden@mit.edu 2008-03-20 15:58:41 -07:00
Родитель a8432bdec9
Коммит a97929d3e5
4 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -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
//