37 |
<h3>Why doesn't my test suite run under JSCoverage in Firefox 3?</h3> |
<h3>Why doesn't my test suite run under JSCoverage in Firefox 3?</h3> |
38 |
|
|
39 |
<p> |
<p> |
40 |
Beta versions of Firefox 3 introduced <a |
Firefox 3 introduces <a |
41 |
href="http://tech.groups.yahoo.com/group/jsunit/message/1075">new |
href="http://tech.groups.yahoo.com/group/jsunit/message/1075">new |
42 |
security restrictions</a> on local files. Depending on the way your |
security restrictions</a> on local files. Depending on the way your |
43 |
test suite is organized, this may cause problems for JSCoverage. |
test suite is organized, this may cause problems for JSCoverage. |
44 |
(You may get the error "uncaught exception: Permission denied to get property Window._$jscoverage".) |
(You may get the error "uncaught exception: Permission denied to get property Window._$jscoverage".) |
45 |
These restrictions are not present in the final release of Firefox 3. |
There are several workarounds: |
46 |
</p> |
</p> |
47 |
|
|
48 |
|
<ul class="list"> |
49 |
|
<li><p>Place your files on a web server instead of loading them from the file system. |
50 |
|
This is usually the simplest solution.</p> |
51 |
|
<li><p>Organize your HTML files in your test suite in a flat directory structure. For example, suppose that |
52 |
|
you instrument your test suite with this command:</p> |
53 |
|
<pre> |
54 |
|
jscoverage src instrumented |
55 |
|
</pre> |
56 |
|
<p>If all your HTML files are located directly under the <code>src/</code> directory (i.e., not in a |
57 |
|
subdirectory of <code>src/</code>), then you should not have any problems using Firefox 3.</p> |
58 |
|
<li><p>Set the <a href="http://kb.mozillazine.org/Editing_configuration">Firefox preference</a> named |
59 |
|
<code><a href="http://kb.mozillazine.org/Security.fileuri.origin_policy">security.fileuri.origin_policy</a></code> |
60 |
|
to 3.</p> |
61 |
|
</ul> |
62 |
|
|
63 |
<h3>I'm trying to load my code with the URL |
<h3>I'm trying to load my code with the URL |
64 |
<code>file:///C:/foo/bar/jscoverage.html?foo/bar.html</code> |
<code>file:///C:/foo/bar/jscoverage.html?foo/bar.html</code> |
65 |
and I'm getting all kinds of JavaScript errors.</h3> |
and I'm getting all kinds of JavaScript errors.</h3> |
101 |
(More information <a href="http://ajaxian.com/archives/garbage-collection-in-ie6">here</a>.) |
(More information <a href="http://ajaxian.com/archives/garbage-collection-in-ie6">here</a>.) |
102 |
</p> |
</p> |
103 |
|
|
104 |
<h3>Can JSCoverage be used with <a href="http://www.jsunit.net/">JsUnit</a>?</h3> |
<h3 id="jsunit">Can JSCoverage be used with <a href="http://www.jsunit.net/">JsUnit</a>?</h3> |
105 |
|
|
106 |
<p> |
<p> |
107 |
It is necessary to run JSCoverage in <dfn>inverted mode</dfn>. You will have to |
It is necessary to run JSCoverage in <dfn>inverted mode</dfn>. You will have to |
148 |
<li><a href="help.html">Help</a> |
<li><a href="help.html">Help</a> |
149 |
<li><a href="license.html">License</a> |
<li><a href="license.html">License</a> |
150 |
<li><a href="links.html">Links</a> |
<li><a href="links.html">Links</a> |
151 |
|
<li><a href="users.html">Users</a> |
152 |
</ul> |
</ul> |
153 |
</div> |
</div> |
154 |
</div> |
</div> |
155 |
<div id="ft"> |
<div id="ft"> |
156 |
<address> |
<address> |
157 |
Copyright © 2007, 2008 <a href="http://siliconforks.com/"><img src="http://siliconforks.com/siliconforks-16x16.png" width="16" height="16" class="icon" alt="Silicon Forks"></a> <a href="http://siliconforks.com/">siliconforks.com</a><br> |
Copyright © 2007, 2008 <a href="http://siliconforks.com/"><img src="siliconforks-16x16.png" width="16" height="16" class="icon" alt="Silicon Forks"></a> <a href="http://siliconforks.com/">siliconforks.com</a><br> |
|
Last updated June 18, 2008<br> |
|
158 |
<a href="mailto:jscoverage@siliconforks.com">jscoverage@siliconforks.com</a> |
<a href="mailto:jscoverage@siliconforks.com">jscoverage@siliconforks.com</a> |
159 |
</address> |
</address> |
160 |
</div> |
</div> |