Test for bug 561971 [r=dtownsend]

--HG--
extra : rebase_source : 64b4940aaeb7b8e0591f7872f0b48b24e01f213a
This commit is contained in:
Mike Hommey 2010-04-29 07:25:38 +00:00
Родитель 3e7bca959a
Коммит 6444a901bf
1 изменённых файлов: 20 добавлений и 0 удалений

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

@ -231,6 +231,25 @@ function test_notify_killed()
process.kill(); process.kill();
} }
// test if killing a process that is already finished doesn't crash
function test_kill_2()
{
var file = get_test_program("TestQuickReturn");
for (var i = 0; i < 1000; i++) {
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(file);
process.run(false, [], 0);
try {
process.kill();
}
catch (e) { }
}
}
function run_test() { function run_test() {
set_environment(); set_environment();
test_kill(); test_kill();
@ -240,4 +259,5 @@ function run_test() {
test_unicode_app(); test_unicode_app();
do_test_pending(); do_test_pending();
test_notify_blocking(); test_notify_blocking();
test_kill_2();
} }