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 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=775852
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 775852</title>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=775852">Mozilla Bug 775852</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
16 <canvas width="1" height="1" id="c"></canvas>
17 </div>
18 <pre id="test">
19 <script type="application/javascript">
21 /** Test for Bug 775852 **/
22 function doTest() {
23 var gl = $("c").getContext("experimental-webgl");
24 if (!gl) {
25 // No WebGL support on MacOS 10.5. Just skip this test
26 todo(false, "WebGL not supported");
27 return;
28 }
29 var setterCalled = false;
31 extLength = gl.getSupportedExtensions().length;
32 ok(extLength > 0,
33 "This test won't work right if we have no supported extensions");
35 Object.defineProperty(Array.prototype, "0",
36 {
37 set: function(val) {
38 setterCalled = true;
39 }
40 });
42 // Test that our property got defined correctly
43 var arr = []
44 arr[0] = 5;
45 is(setterCalled, true, "Setter should be called when setting prop on array");
47 setterCalled = false;
49 is(gl.getSupportedExtensions().length, extLength,
50 "We should still have the same number of extensions");
52 is(setterCalled, false,
53 "Setter should not be called when getting supported extensions");
54 }
55 doTest();
56 </script>
57 </pre>
58 </body>
59 </html>