Sat, 03 Jan 2015 20:18:00 +0100
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 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /**
5 * This test checks that frozen objects report themselves as frozen in their
6 * grip.
7 */
9 var gDebuggee;
10 var gClient;
11 var gThreadClient;
13 function run_test()
14 {
15 initTestDebuggerServer();
16 gDebuggee = addTestGlobal("test-grips");
17 gDebuggee.eval(function stopMe(arg1, arg2) {
18 debugger;
19 }.toString());
21 gClient = new DebuggerClient(DebuggerServer.connectPipe());
22 gClient.connect(function() {
23 attachTestTabAndResume(gClient, "test-grips", function(aResponse, aTabClient, aThreadClient) {
24 gThreadClient = aThreadClient;
25 test_object_grip();
26 });
27 });
28 do_test_pending();
29 }
31 function test_object_grip()
32 {
33 gThreadClient.addOneTimeListener("paused", function(aEvent, aPacket) {
34 let obj1 = aPacket.frame.arguments[0];
35 do_check_true(obj1.frozen);
37 let obj1Client = gThreadClient.pauseGrip(obj1);
38 do_check_true(obj1Client.isFrozen);
40 let obj2 = aPacket.frame.arguments[1];
41 do_check_false(obj2.frozen);
43 let obj2Client = gThreadClient.pauseGrip(obj2);
44 do_check_false(obj2Client.isFrozen);
46 gThreadClient.resume(_ => {
47 finishClient(gClient);
48 });
49 });
51 gDebuggee.eval("(" + function () {
52 let obj1 = {};
53 Object.freeze(obj1);
54 stopMe(obj1, {});
55 } + "())");
56 }