зеркало из https://github.com/mozilla/pjs.git
Test only - Bug 503409 - test_0030_general.js hangs on WinMo. add do_throw when the directory specified for nsHttpServer registerDirectory doesn't exist or isn't a directory. r=me
This commit is contained in:
Родитель
6905e62c49
Коммит
e86dda7ec7
|
@ -698,9 +698,18 @@ function removeDirRecursive(aDir) {
|
|||
* toolkit/mozapps/update/test/unit/
|
||||
*/
|
||||
function start_httpserver(aRelativeDirName) {
|
||||
var dir = do_get_file(aRelativeDirName);
|
||||
if (!dir.exists())
|
||||
do_throw("The directory used by nsHttpServer does not exist! path: " +
|
||||
dir.path + "\n");
|
||||
|
||||
if (!dir.isDirectory())
|
||||
do_throw("A file instead of a directory was specified for nsHttpServer " +
|
||||
"registerDirectory! path: " dir.path + "\n");
|
||||
|
||||
do_load_httpd_js();
|
||||
gTestserver = new nsHttpServer();
|
||||
gTestserver.registerDirectory("/data/", do_get_file(aRelativeDirName));
|
||||
gTestserver.registerDirectory("/data/", dir);
|
||||
gTestserver.start(4444);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
/* General Update Manager Tests */
|
||||
|
||||
function run_test() {
|
||||
dump("Testing: removing an active update for a channel that is not valid" +
|
||||
dump("Testing: removing an active update for a channel that is not valid " +
|
||||
"due to switching channels - bug 486275\n");
|
||||
removeUpdateDirsAndFiles();
|
||||
var defaults = getPrefBranch().QueryInterface(AUS_Ci.nsIPrefService).
|
||||
|
|
Загрузка…
Ссылка в новой задаче