--- trunk/doc/manual.html 2009/12/27 18:53:34 498 +++ trunk/doc/manual.html 2009/12/28 04:21:14 502 @@ -509,6 +509,8 @@
Use the specified JavaScript version; valid values for VERSION are 1.0, 1.1, 1.2, ..., 1.8, or ECMAv3 (the default). +
--mozilla +
Specify that the source directory contains an application based on the Mozilla platform (see below).
--no-highlight
Do not perform syntax highlighting of JavaScript code.
--no-instrument=URL @@ -700,6 +702,58 @@ Currently, //#JSCOVERAGE_IF comments are not recorded in stored coverage reports.

+

Code coverage for Mozilla platform applications

+ +

+JSCoverage can be used to generate code coverage data for applications based on +the Mozilla platform. +

+ +
+

Warning

+ The functionality described here is highly experimental. It may change in future versions. +
+ +

+A simple example program is included in the doc/example-mozilla/ +directory. +You can instrument and run this program as follows: +

+ +
+jscoverage --mozilla --no-instrument=defaults doc/example-mozilla doc/example-mozilla-instrumented
+xulrunner doc/example-mozilla-instrumented/application.ini -console
+
+ +

+Note that the --mozilla option is used to specify that the program +is based on the Mozilla platform. +Also, the code in the defaults/ directory is skipped because the +.js files in this directory are preferences files (and are +different from ordinary JavaScript files). +XULRunner is used to run the instrumented application: +

+ +

+Screenshot +

+ +

+The JavaScript code in the application is executed by selecting a radio button: +

+ +

+Screenshot +

+ +

+When the application is exited, a coverage report is stored in a subdirectory of +the application's directory named jscoverage-report/. +You can view the report in a web browser by opening the +jscoverage.html file in this directory (i.e., +doc/example-mozilla-instrumented/jscoverage-report/jscoverage.html). +

+

Caveats