Dojo Unit Tests (DOH) And Firefox 3
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: “0x805303f4 (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.
robin said,
March 31, 2010 @ 11:14 am
1 year later and still not fixed…
Robin Gaal said,
April 7, 2010 @ 11:39 am
Here is an easier workaround to use D.O.H. with mozilla 3:
about:config (type in addressbar)
set attribute : security.fileuri.strict_origin_policy to false