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 // |jit-test| allow-oom
2 var STATUS = "STATUS: ";
3 var callStack = new Array();
4 function startTest() { }
5 function TestCase(n, d, e, a) {
6 this.name = n;
7 }
8 TestCase.prototype.dump = function () {};
9 TestCase.prototype.testPassed = (function TestCase_testPassed() { return this.passed; });
10 TestCase.prototype.testFailed = (function TestCase_testFailed() { return !this.passed; });
11 function printStatus (msg) {
12 var lines = msg.split ("\n");
13 for (var i=0; i<lines.length; i++)
14 print (STATUS + lines[i]);
15 }
16 function printBugNumber (num) {}
17 function toPrinted(value)
18 function escapeString (str) {}
19 function reportCompare (expected, actual, description) {
20 var actual_t = typeof actual;
21 var output = "";
22 printStatus (
23 "Expected value '"
24 + toPrinted(expected)
25 + toPrinted(actual)
26 );
27 var testcase = new TestCase("unknown-test-name", description, expected, actual);
28 testcase.reason = output;
29 if (typeof document != "object" || !document.location.href.match(/jsreftest.html/)) {
30 if (testcase.passed) { }
31 }
32 return testcase.passed;
33 }
34 function reportMatch (expectedRegExp, actual, description) {}
35 function enterFunc (funcName)
36 function BigO(data) {
37 function LinearRegression(data) { }
38 }
39 function compareSource(expect, actual, summary) {}
40 function optionsInit() {
41 var optionNames = options().split(',');
42 }
43 function optionsClear() {}
44 function optionsPush() {}
45 optionsInit();
46 optionsClear();
47 function getTestCaseResult(expected, actual)
48 function test() {
49 for ( gTc=0; gTc < gTestcases.length; gTc++ ) {}
50 }
51 var lfcode = new Array();
52 lfcode.push("4");
53 lfcode.push("gcparam(\"maxBytes\", gcparam(\"gcBytes\") + 1024);");
54 lfcode.push("");
55 lfcode.push("\
56 var UBound = 0;\n\
57 var BUGNUMBER = 74474;\n\
58 var actual = '';\n\
59 var actualvalues = [ ];\n\
60 var expectedvalues = [ ];\n\
61 addThis();\n\
62 addThis();\n\
63 tryThis(1);\n\
64 function tryThis(x)\n\
65 addThis();\n\
66 test();\n\
67 function addThis() {\n\
68 actualvalues[UBound] = actual;\n\
69 UBound++;\n\
70 }\n\
71 function test() {\n\
72 enterFunc ('test');\n\
73 printBugNumber(BUGNUMBER);\n\
74 for (var i = 0; i < UBound; i++)\n\
75 reportCompare(expectedvalues[i], actualvalues[i], getStatus(i));\n\
76 }\n\
77 function getStatus(i) {}\n\
78 ");
79 delete Debugger;
80 while (true) {
81 var file = lfcode.shift(); if (file == undefined) { break; }
82 if (file == "evaluate") {
83 } else {
84 loadFile(file)
85 }
86 }
87 function loadFile(lfVarx) {
88 try {
89 if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) {
90 switch (lfRunTypeId) {
91 case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break;
92 case 4: eval("(function() { " + lfVarx + " })();"); break;
93 }
94 } else if (!isNaN(lfVarx)) {
95 lfRunTypeId = parseInt(lfVarx);
96 switch (lfRunTypeId) {
97 case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break;
98 }
99 }
100 } catch (lfVare) {
101 if (lfVare instanceof SyntaxError) { }
102 }
103 }