/[jscoverage]/trunk/doc/faq.html
ViewVC logotype

Diff of /trunk/doc/faq.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by siliconforks, Wed Aug 22 18:46:11 2007 UTC revision 66 by siliconforks, Thu Nov 22 01:05:55 2007 UTC
# Line 13  Line 13 
13        <div id="jscoverage-main" class="yui-b">        <div id="jscoverage-main" class="yui-b">
14          <h2><abbr title="Frequently Asked Questions">FAQ</abbr></h2>          <h2><abbr title="Frequently Asked Questions">FAQ</abbr></h2>
15    
16            <h3>Can I use JSCoverage to measure code coverage for a page on <code>http://<var>example.com</var>/</code>?</h3>
17    
18            <p>
19            In order to measure the code coverage of a page on <code>http://example.com/</code>,
20            you must run <code>jscoverage</code> to create a <code>jscoverage.html</code> file on the
21            <code>example.com</code> server.  You cannot use <code>http://example.org/jscoverage.html</code>
22            to measure the code coverage of a page located on <code>http://example.com/</code>.
23            </p>
24    
25            <p>
26            The fundamental reason for this limitation is the
27            <a href="http://www.mozilla.org/projects/security/components/same-origin.html">Same Origin Policy</a>
28            for untrusted JavaScript.
29            </p>
30    
31            <p>
32            (In fact, the current version of JSCoverage is slightly more restrictive
33            than this: it requires that the JavaScript being measured reside under the
34            same <strong>directory</strong> as the <code>jscoverage.html</code> file.)
35            </p>
36    
37          <h3>I'm trying to load my code with the URL          <h3>I'm trying to load my code with the URL
38          <code>file:///C:/foo/bar/jscoverage.html?foo/bar.html</code>          <code>file:///C:/foo/bar/jscoverage.html?foo/bar.html</code>
39          and I'm getting all kinds of JavaScript errors.</h3>          and I'm getting all kinds of JavaScript errors.</h3>
# Line 80  Line 101 
101         </p>         </p>
102    
103  <pre>  <pre>
104  http://127.0.0.1/jsunit/testRunner.html?testPage=http://127.0.0.1/test.html&amp;autorun=true  http://127.0.0.1/jsunit/testRunner.html?testPage=http://127.0.0.1/test.html&amp;autoRun=true
105  </pre>  </pre>
106    
107        <p>        <p>
# Line 107  Line 128 
128    <div id="ft">    <div id="ft">
129      <address>      <address>
130        Copyright &copy; 2007 siliconforks.com<br>        Copyright &copy; 2007 siliconforks.com<br>
131        Last updated August 15, 2007<br>        Last updated August 26, 2007<br>
132        <a href="mailto:jscoverage@siliconforks.com">jscoverage@siliconforks.com</a>        <a href="mailto:jscoverage@siliconforks.com">jscoverage@siliconforks.com</a>
133      </address>      </address>
134    </div>      </div>  

Legend:
Removed from v.41  
changed lines
  Added in v.66

  ViewVC Help
Powered by ViewVC 1.1.24