js/src/gdb/tests/test-JSObject.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 # Printing JSObjects.
michael@0 2
michael@0 3 assert_subprinter_registered('SpiderMonkey', 'ptr-to-JSObject')
michael@0 4 assert_subprinter_registered('SpiderMonkey', 'ref-to-JSObject')
michael@0 5
michael@0 6 run_fragment('JSObject.simple')
michael@0 7
michael@0 8 # These patterns look a little strange because of prolog.py's 'set print
michael@0 9 # address off', which avoids putting varying addresses in the output. After
michael@0 10 # the '(JSObject *) ', there is a 'void *' value printing as the empty
michael@0 11 # string.
michael@0 12
michael@0 13 assert_pretty('glob', '(JSObject *) [object global] delegate')
michael@0 14 assert_pretty('plain', '(JSObject *) [object Object]')
michael@0 15 assert_pretty('func', '(JSObject *) [object Function "dys"]')
michael@0 16 assert_pretty('anon', '(JSObject *) [object Function <unnamed>]')
michael@0 17 assert_pretty('funcPtr', '(JSFunction *) [object Function "formFollows"]')
michael@0 18
michael@0 19 assert_pretty('plainRef', '(JSObject &) @ [object Object]')
michael@0 20 assert_pretty('funcRef', '(JSFunction &) @ [object Function "formFollows"]')

mercurial