Bug 521189 - Some necko unit tests fail or hang with 'strict' & 'werror' on. r=jwalden

This commit is contained in:
Jae-Seong Lee 2009-11-10 14:11:31 -08:00
Родитель 77efbf0b5d
Коммит 15a8baae3b
6 изменённых файлов: 14 добавлений и 14 удалений

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

@ -458,7 +458,7 @@ nsHttpServer.prototype =
}
};
gThreadManager.currentThread
.dispatch(stopEvent, Ci.nsIThreadManager.DISPATCH_NORMAL);
.dispatch(stopEvent, Ci.nsIThread.DISPATCH_NORMAL);
}
},
@ -2599,7 +2599,7 @@ ServerHandler.prototype =
// Seek (or read, if seeking isn't supported) to the correct offset so
// the data sent to the client matches the requested range.
if (fis instanceof Ci.nsISeekableStream)
fis.seek(Ci.nsISeekableStream.SEEK_SET, offset);
fis.seek(Ci.nsISeekableStream.NS_SEEK_SET, offset);
else
new ScriptableInputStream(fis).read(offset);
}
@ -2613,7 +2613,7 @@ ServerHandler.prototype =
function writeMore()
{
gThreadManager.currentThread
.dispatch(writeData, Ci.nsIThreadManager.DISPATCH_NORMAL);
.dispatch(writeData, Ci.nsIThread.DISPATCH_NORMAL);
}
var input = new BinaryInputStream(fis);
@ -3688,7 +3688,7 @@ Response.prototype =
dumpn("*** canceling copy asynchronously...");
copier.cancel(Cr.NS_ERROR_UNEXPECTED);
}
}, Ci.nsIThreadManager.DISPATCH_NORMAL);
}, Ci.nsIThread.DISPATCH_NORMAL);
}
else
{
@ -3993,7 +3993,7 @@ WriteThroughCopier.prototype =
}
};
gThreadManager.currentThread
.dispatch(cancelEvent, Ci.nsIThreadManager.DISPATCH_NORMAL);
.dispatch(cancelEvent, Ci.nsIThread.DISPATCH_NORMAL);
},
/**

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

@ -75,7 +75,7 @@ function createTestDirectory()
// populate with test directories, files, etc.
// Files must be in expected order of display on the index page!
files = [];
var files = [];
makeFile("aa_directory", true, dir, files);
makeFile("Ba_directory", true, dir, files);
@ -179,7 +179,7 @@ function hiddenDataCheck(bytes, uri, path)
do_check_eq(link.textContent, f.name + sep);
var uri = ios.newURI(link.getAttribute("href"), null, top);
uri = ios.newURI(link.getAttribute("href"), null, top);
do_check_eq(decodeURIComponent(uri.path), path + f.name + sep);
}
}
@ -259,7 +259,7 @@ function dataCheck(bytes, uri, path, dirEntries)
do_check_eq(link.textContent, f.name + sep);
var uri = ios.newURI(link.getAttribute("href"), null, top);
uri = ios.newURI(link.getAttribute("href"), null, top);
do_check_eq(decodeURIComponent(uri.path), path + f.name + sep);
}
}

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

@ -358,7 +358,7 @@ function handleAsyncOrdering(request, response)
// intended for public use! If you do this in client code, expect me to
// knowingly break your code by changing the variable name. :-P
gThreadManager.currentThread
.dispatch(writeData, Ci.nsIThreadManager.DISPATCH_NORMAL);
.dispatch(writeData, Ci.nsIThread.DISPATCH_NORMAL);
}
step();
response.processAsync();

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

@ -86,7 +86,7 @@ function callASAPLater(fun)
{
fun();
}
}, Ci.nsIThreadManager.DISPATCH_NORMAL);
}, Ci.nsIThread.DISPATCH_NORMAL);
}
@ -274,11 +274,11 @@ tests.push(test);
data = "GET /thrown-exception?writeBeforeEmpty HTTP/1.0\r\n" +
"\r\n";
function checkThrownExceptionWriteBefore(data)
function checkThrownExceptionWriteBeforeEmpty(data)
{
do_check_eq(data, "preparing to throw...");
}
test = new RawTest("localhost", PORT, data, checkThrownExceptionWriteBefore),
test = new RawTest("localhost", PORT, data, checkThrownExceptionWriteBeforeEmpty),
tests.push(test);
data = "GET /thrown-exception HTTP/1.0\r\n" +

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

@ -30,7 +30,7 @@ function firstTimeThrough(request, buffer)
{
do_check_eq(buffer, responseBody);
var chan = make_channel(randomURI);
chan.loadFlags |= Ci.nsICachingChannel.LOAD_FROM_CACHE;
chan.loadFlags |= Ci.nsIRequest.LOAD_FROM_CACHE;
chan.asyncOpen(new ChannelListener(finish_test, null), null);
}

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

@ -320,7 +320,7 @@ function handleAuth(metadata, response) {
// /auth
function authHandler(metadata, response) {
response.setHeader("Content-Type", "text/html", false);
body = handleAuth(metadata, response) ? "success" : "failure";
var body = handleAuth(metadata, response) ? "success" : "failure";
response.bodyOutputStream.write(body, body.length);
}