js/src/gdb/tests/test-jsval.py

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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 # Basic unit tests for jsval pretty-printer.
michael@0 2
michael@0 3 assert_subprinter_registered('SpiderMonkey', 'JS::Value')
michael@0 4
michael@0 5 run_fragment('jsval.simple')
michael@0 6
michael@0 7 assert_pretty('fortytwo', '$jsval(42)')
michael@0 8 assert_pretty('negone', '$jsval(-1)')
michael@0 9 assert_pretty('undefined', 'JSVAL_VOID')
michael@0 10 assert_pretty('null', 'JSVAL_NULL')
michael@0 11 assert_pretty('js_true', 'JSVAL_TRUE')
michael@0 12 assert_pretty('js_false', 'JSVAL_FALSE')
michael@0 13 assert_pretty('elements_hole', '$jsmagic(JS_ELEMENTS_HOLE)')
michael@0 14 assert_pretty('empty_string', '$jsval("")')
michael@0 15 assert_pretty('friendly_string', '$jsval("Hello!")')
michael@0 16 assert_pretty('global', '$jsval((JSObject *) [object global] delegate)')
michael@0 17 assert_pretty('onehundredthirtysevenonehundredtwentyeighths', '$jsval(1.0703125)')

mercurial