Tried having a bash with
jsUnit today, and got instantly stuck when trying to run a basic test case.
FireFox simply hung, and I really had no idea why. For the first time, IE8 worked fine!
Thanks to
this post, it was straightforward enough to get working.
First you have to modify the jsUnitTestManager.js file, and replace/insert the following code:
function isFF3() {
return (
navigator.userAgent.toLowerCase().indexOf("iceweasel/3") != -1 ||
navigator.userAgent.toLowerCase().indexOf("firefox/3") != -1
)
}
function browserSupportsReadingFullPathFromFileField() {
return !isOpera() && !isIE7() && !isFF3();
//return !isOpera() && !isIE7();
}Secondly, you'll have to disable the draconian security that new FF introduces. Type about:config in your address bar and then set
security.fileuri.strict_origin_policy to false. This will allow FireFox to access local resources without a problem.
Now it will have disabled the browse to field, so the only way you can run your tests is directly via the address bar, as so:
<path to testrunner.html>?testpage=<path to mytests.html>