Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 JS Trace Test Suite
3 * PURPOSE
5 This is a test suite for testing TraceMonkey. All tests are run in the JS shell
6 with tracing enabled (-j).
8 * REQUIREMENTS
10 Python 2.5. This is already a standard requirement for building our tree.
12 * RUNNING THE TESTS
14 Basic usage:
16 python jit_test.py <path-to-js-shell>
18 The progress bar shows [#tests passed, #tests failed, #tests run] at the left.
19 If all tests pass, the output is 'PASSED ALL'. The test suite can be interrupted
20 at any time with Ctrl+C and partial results will be printed.
22 To run only the basic tests, not including the slow tests:
24 python jit_test.py <path-to-js-shell> basic
26 For more options:
28 python jit_test.py -h
30 * CREATING NEW TESTS
32 Simply create a JS file under the 'tests/' directory. Most tests should go in
33 'tests/basic/'.
35 All tests are run with 'lib/prolog.js' included first on the command line. The
36 command line also creates a global variable 'libdir' that is set to the path
37 of the 'lib' directory. To include a file 'foo.js' from the lib directory in a
38 test case:
40 load(libdir + 'foo.js')
42 * TEST METALINES
44 The first line of a test case can contain a special comment controlling how the
45 test is run. For example:
47 // |jit-test| allow-oom;
49 The general format in EBNF is:
51 metaline ::= cookie { item ";" }
52 cookie ::= "|jit-test|"
53 item ::= flag | attribute
55 flag ::= "slow" | "allow-oom" | "valgrind" | "tz-pacific" |
56 "ion-eager" | "debug" |
57 "dump-bytecode" |
60 attribute ::= name ":" value
61 name ::= "error" | "exitstatus"
62 value ::= <string>
64 The metaline may appear anywhere in the first line of the file: this allows it
65 to be placed inside any kind of comment.
67 The meaning of the items:
69 slow Test runs slowly. Do not run if the --no-slow option is given.
70 allow-oom If the test runs out of memory, it counts as passing.
71 valgrind Run test under valgrind.
72 tz-pacific Always run test with the Pacific time zone (TZ=PST8PDT).
73 ion-eager Run js with --ion-eager, whether --jitflags says to or not
74 debug Run js with -d, whether --jitflags says to or not
75 dump-bytecode Run js with -D, whether --jitflags says to or not
77 error The test should be considered to pass iff it throws the
78 given JS exception.
79 exitstatus The test should exit with the given status value (an integer).
81 * END