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.

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

mercurial