Bug 793585 - Only default the shared state if it's not there. r=joe

This commit is contained in:
Adam Dane [:hobophobe] 2012-10-08 16:09:11 -05:00
Родитель 3f421578e3
Коммит d05b6d6537
2 изменённых файлов: 5 добавлений и 3 удалений

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

@ -43,7 +43,9 @@ function getFileAsInputStream(aFilename) {
function handleRequest(request, response)
{
setSharedState("next-part", "-1");
if (!getSharedState("next-part")) {
setSharedState("next-part", "-1");
}
response.setHeader("Content-Type",
"multipart/x-mixed-replace;boundary=BOUNDARYOMG", false);
response.setHeader("Cache-Control", "no-cache", false);

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

@ -67,10 +67,10 @@ function imageLoad(aEvent) {
is(aEvent.target.width, width,
"Test " + testIndex + " " + fileName + " width correct");
// Always call readyForNext here, as it's the closest we have to a cleanup
readyForNext();
if ((testParts.length - 1) == testIndex) {
SimpleTest.finish();
} else {
readyForNext();
}
}