gecko/js/src/tests
2014-02-05 14:10:52 +00:00
..
ecma
ecma_2
ecma_3
ecma_3_1
ecma_5 Bug 963641 - Add a test for __proto__ in destructuring patterns as a shorthand. r=jorendorff 2014-01-28 10:38:29 -08:00
ecma_6 Bug 958951 - Return IteratorResult object for completed generators instead of throwing. r=jorendorff 2014-02-01 23:20:14 +01:00
Intl Backed out changeset 6e956de758ce (bug 924839) for xperf bustage on a CLOSED TREE 2014-01-30 16:57:49 -08:00
js1_1
js1_2
js1_3
js1_4
js1_5 Backed out 3 changesets (bug 932309, bug 932322) for Linux mochitest-bc timeouts on a CLOSED TREE. 2013-11-04 14:31:21 -05:00
js1_6
js1_7
js1_8
js1_8_1
js1_8_5 Bug 948583 - Make __proto__ in object literals use JSObject::setProto, rather than depending on Object.prototype.__proto__. r=jorendorff, r=bholley, r=efaust 2013-12-18 20:14:17 -05:00
lib Bug 967430 - Add --repeat option to jit-tests runner r=terrence 2014-02-05 14:10:52 +00:00
style
supporting
test262
browser.js
compare_bench.py
js-test-driver-begin.js
js-test-driver-end.js
jsreftest.html
jstests.list
jstests.py Bug 927685 - Enable --ion-parallel-compile=on by default in the shell; r=jandem,sr=jorendorff 2013-11-12 14:02:24 -08:00
Makefile.in
moz.build Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00
parsemark.py
README.txt
shell.js
update-test262.sh
user.js

JS Test Suite Readme
====================

The JS test suite is a fairly extensive collection of correctness and regression
tests for the Spidermonkey engine. Two harnesses run these tests: the shell test
harness in this directory and the "reftest" harness built into the browser, used
by Tinderbox. The browser reftests require additional manifest files; these are
generated automatically by the build phase 'package-tests' using the
'--make-manifests' option to jstests.py.

Creating a test
---------------
For general information, see
https://developer.mozilla.org/en-US/docs/SpiderMonkey/Creating_JavaScript_tests

Adding a test
-------------
    Drop it in an appropriate directory under the tests directory.

        <fineprint> Some names are forbidden. Do not name your test browser.js,
        shell.js, jsref.js, template.js, user.js, js-test-driver-begin.js, or
        js-test-driver-end.js, or any of the names of the files in supporting/.
        </fineprint>

Adjusting when and how a test runs
----------------------------------
    Put a comment at the top of the header matching the format:
        // |reftest| <failure-type> -- <comment>

    Where <failure-type> is a standard reftest <failure-type> string, as documented by:
        http://mxr.mozilla.org/mozilla-central/source/layout/tools/reftest/README.txt

    Example:
        // |reftest| skip-if(!xulRuntime.shell) -- does not always dismiss alert

        <fineprint> Either // or /* */ style comments may be used. The entire
        comment must appear in the first 512 bytes of the file. The control
        string must be in its own comment block. </fineprint>

    When adding such comments to individual files is not feasible (e.g., for
    imported tests), reftest manifest entries can be added to jstests.list
    instead. Combining in-file comments with entries in this manifest file for
    the same files is not supported (the one from the manifest file will be
    used). Only the following two forms are supported:
        <failure-type> include <relative_path>
        <failure-type> script <relative_path>
    The <type> "include" indicates that <failure-type> should apply to all test
    cases within a directory. A statement for a nested directory or script
    overrides one for an enclosing directory.

Running tests
-------------
See
https://developer.mozilla.org/en-US/docs/SpiderMonkey/Running_Automated_JavaScript_Tests