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.
michael@0 | 1 | JS Trace Test Suite |
michael@0 | 2 | |
michael@0 | 3 | * PURPOSE |
michael@0 | 4 | |
michael@0 | 5 | This is a test suite for testing TraceMonkey. All tests are run in the JS shell |
michael@0 | 6 | with tracing enabled (-j). |
michael@0 | 7 | |
michael@0 | 8 | * REQUIREMENTS |
michael@0 | 9 | |
michael@0 | 10 | Python 2.5. This is already a standard requirement for building our tree. |
michael@0 | 11 | |
michael@0 | 12 | * RUNNING THE TESTS |
michael@0 | 13 | |
michael@0 | 14 | Basic usage: |
michael@0 | 15 | |
michael@0 | 16 | python jit_test.py <path-to-js-shell> |
michael@0 | 17 | |
michael@0 | 18 | The progress bar shows [#tests passed, #tests failed, #tests run] at the left. |
michael@0 | 19 | If all tests pass, the output is 'PASSED ALL'. The test suite can be interrupted |
michael@0 | 20 | at any time with Ctrl+C and partial results will be printed. |
michael@0 | 21 | |
michael@0 | 22 | To run only the basic tests, not including the slow tests: |
michael@0 | 23 | |
michael@0 | 24 | python jit_test.py <path-to-js-shell> basic |
michael@0 | 25 | |
michael@0 | 26 | For more options: |
michael@0 | 27 | |
michael@0 | 28 | python jit_test.py -h |
michael@0 | 29 | |
michael@0 | 30 | * CREATING NEW TESTS |
michael@0 | 31 | |
michael@0 | 32 | Simply create a JS file under the 'tests/' directory. Most tests should go in |
michael@0 | 33 | 'tests/basic/'. |
michael@0 | 34 | |
michael@0 | 35 | All tests are run with 'lib/prolog.js' included first on the command line. The |
michael@0 | 36 | command line also creates a global variable 'libdir' that is set to the path |
michael@0 | 37 | of the 'lib' directory. To include a file 'foo.js' from the lib directory in a |
michael@0 | 38 | test case: |
michael@0 | 39 | |
michael@0 | 40 | load(libdir + 'foo.js') |
michael@0 | 41 | |
michael@0 | 42 | * TEST METALINES |
michael@0 | 43 | |
michael@0 | 44 | The first line of a test case can contain a special comment controlling how the |
michael@0 | 45 | test is run. For example: |
michael@0 | 46 | |
michael@0 | 47 | // |jit-test| allow-oom; |
michael@0 | 48 | |
michael@0 | 49 | The general format in EBNF is: |
michael@0 | 50 | |
michael@0 | 51 | metaline ::= cookie { item ";" } |
michael@0 | 52 | cookie ::= "|jit-test|" |
michael@0 | 53 | item ::= flag | attribute |
michael@0 | 54 | |
michael@0 | 55 | flag ::= "slow" | "allow-oom" | "valgrind" | "tz-pacific" | |
michael@0 | 56 | "ion-eager" | "debug" | |
michael@0 | 57 | "dump-bytecode" | |
michael@0 | 58 | |
michael@0 | 59 | |
michael@0 | 60 | attribute ::= name ":" value |
michael@0 | 61 | name ::= "error" | "exitstatus" |
michael@0 | 62 | value ::= <string> |
michael@0 | 63 | |
michael@0 | 64 | The metaline may appear anywhere in the first line of the file: this allows it |
michael@0 | 65 | to be placed inside any kind of comment. |
michael@0 | 66 | |
michael@0 | 67 | The meaning of the items: |
michael@0 | 68 | |
michael@0 | 69 | slow Test runs slowly. Do not run if the --no-slow option is given. |
michael@0 | 70 | allow-oom If the test runs out of memory, it counts as passing. |
michael@0 | 71 | valgrind Run test under valgrind. |
michael@0 | 72 | tz-pacific Always run test with the Pacific time zone (TZ=PST8PDT). |
michael@0 | 73 | ion-eager Run js with --ion-eager, whether --jitflags says to or not |
michael@0 | 74 | debug Run js with -d, whether --jitflags says to or not |
michael@0 | 75 | dump-bytecode Run js with -D, whether --jitflags says to or not |
michael@0 | 76 | |
michael@0 | 77 | error The test should be considered to pass iff it throws the |
michael@0 | 78 | given JS exception. |
michael@0 | 79 | exitstatus The test should exit with the given status value (an integer). |
michael@0 | 80 | |
michael@0 | 81 | * END |