js/src/gdb/tests/test-JSString.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 # Printing JSStrings.
     3 assert_subprinter_registered('SpiderMonkey', 'ptr-to-JSString')
     4 run_fragment('JSString.simple')
     6 assert_pretty('empty', '""')
     7 assert_pretty('x', '"x"')
     8 assert_pretty('z', '"z"')
     9 assert_pretty('xz', '"xz"')
    11 stars = gdb.parse_and_eval('stars')
    12 assert_eq(str(stars), "'*' <repeats 100 times>")
    14 doubleStars = gdb.parse_and_eval('doubleStars')
    15 assert_eq(str(doubleStars), "'*' <repeats 200 times>")
    17 assert_pretty('xRaw', '"x"')
    19 # JSAtom *
    21 run_fragment('JSString.atom')
    23 assert_pretty('molybdenum', '"molybdenum"')

mercurial