js/src/jit-test/tests/debug/Debugger-debuggees-08.js

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 // Adding a debuggee more than once is redundant.
michael@0 2
michael@0 3 var dbg = new Debugger;
michael@0 4 var g = newGlobal();
michael@0 5 var w = dbg.addDebuggee(g);
michael@0 6 assertEq(w instanceof Debugger.Object, true);
michael@0 7
michael@0 8 function usual() {
michael@0 9 assertEq(dbg.hasDebuggee(g), true);
michael@0 10 assertEq(dbg.hasDebuggee(w), true);
michael@0 11 var arr = dbg.getDebuggees();
michael@0 12 assertEq(arr.length, 1);
michael@0 13 assertEq(arr[0], w);
michael@0 14 }
michael@0 15
michael@0 16 usual();
michael@0 17 assertEq(dbg.addDebuggee(g), w);
michael@0 18 usual();
michael@0 19 assertEq(dbg.addDebuggee(w), w);
michael@0 20 usual();
michael@0 21
michael@0 22 // Removing the debuggee once is enough.
michael@0 23 assertEq(dbg.removeDebuggee(g), undefined);
michael@0 24 assertEq(dbg.hasDebuggee(g), false);
michael@0 25 assertEq(dbg.getDebuggees().length, 0);

mercurial