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/ */
3 /**
4 * This tests exercises getProtypesAndProperties message accepted
5 * by a thread actor.
6 */
8 var gDebuggee;
9 var gClient;
10 var gThreadClient;
12 function run_test()
13 {
14 initTestDebuggerServer();
15 gDebuggee = addTestGlobal("test-grips");
16 gDebuggee.eval(function stopMe(arg1, arg2) {
17 debugger;
18 }.toString());
20 gClient = new DebuggerClient(DebuggerServer.connectPipe());
21 gClient.connect(function() {
22 attachTestTabAndResume(gClient, "test-grips", function(aResponse, aTabClient, aThreadClient) {
23 gThreadClient = aThreadClient;
24 test_object_grip();
25 });
26 });
27 do_test_pending();
28 }
30 function test_object_grip()
31 {
32 gThreadClient.addOneTimeListener("paused", function(aEvent, aPacket) {
33 let args = aPacket.frame.arguments;
35 gThreadClient.getPrototypesAndProperties([args[0].actor, args[1].actor], function(aResponse) {
36 let obj1 = aResponse.actors[args[0].actor];
37 let obj2 = aResponse.actors[args[1].actor];
38 do_check_eq(obj1.ownProperties.x.configurable, true);
39 do_check_eq(obj1.ownProperties.x.enumerable, true);
40 do_check_eq(obj1.ownProperties.x.writable, true);
41 do_check_eq(obj1.ownProperties.x.value, 10);
43 do_check_eq(obj1.ownProperties.y.configurable, true);
44 do_check_eq(obj1.ownProperties.y.enumerable, true);
45 do_check_eq(obj1.ownProperties.y.writable, true);
46 do_check_eq(obj1.ownProperties.y.value, "kaiju");
48 do_check_eq(obj2.ownProperties.z.configurable, true);
49 do_check_eq(obj2.ownProperties.z.enumerable, true);
50 do_check_eq(obj2.ownProperties.z.writable, true);
51 do_check_eq(obj2.ownProperties.z.value, 123);
53 do_check_true(obj1.prototype != undefined);
54 do_check_true(obj2.prototype != undefined);
56 gThreadClient.resume(function() {
57 finishClient(gClient);
58 });
59 });
61 });
63 gDebuggee.eval("stopMe({ x: 10, y: 'kaiju'}, { z: 123 })");
64 }