Bug 400392 - "necko unit test test_reopen.js fails randomly on qm-centos5-01" [p=sylvain.pasche@gmail.com (Sylvain Pasche) r=biesi]

git-svn-id: svn://10.0.0.236/trunk@238962 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com 2007-11-08 08:23:51 +00:00
parent 7c0d4c47b5
commit 84d1679532

View File

@ -40,7 +40,11 @@ function check_throws(closure, error) {
try {
closure();
} catch (e) {
do_check_eq(e.result, error);
if (error instanceof Array) {
do_check_neq(error.indexOf(e.result), -1);
} else {
do_check_eq(e.result, error);
}
thrown = true;
}
do_check_true(thrown);
@ -92,7 +96,7 @@ function test_channel(createChanClosure) {
chan = createChanClosure();
var inputStream = chan.open();
check_open_throws(NS_ERROR_IN_PROGRESS);
check_async_open_throws(NS_ERROR_ALREADY_OPENED);
check_async_open_throws([NS_ERROR_IN_PROGRESS, NS_ERROR_ALREADY_OPENED]);
// Then, asynchronous one
chan = createChanClosure();