In the past I had looked at Dojo’s own unit tests and one thing that impressed me was the ability to double-click a local HTML file and have tests executed in my default browser.
Recently I began taking a closer look at the Dojo Objective Harness (DOH) and one of the first things I found out was that local tests could run in Konqueror but not in Firefox 3. Firebug showed errors such as the one below:
failed loading ../../dojo/./_firebug/firebug.js with error: [Exception… “Access to restricted URI denied” code: “1012″ nsresult: “0×805303f4 (NS_ERROR_DOM_BAD_URI)”
I looked around and found out that a security fix in Firefox 3 prevents loading files from sibling or parent sibling directories:
http://ejohn.org/blog/tightened-local-file-security
https://bugzilla.mozilla.org/show_bug.cgi?id=230606
The workaround for me was to put the dojotoolkit on a local server and load the tests through it. This works fine and allows me to debug tests using Firebug but it sure would be preferable to run these tests without a web server.