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 <head>
4 <meta charset="UTF-8">
5 <title>Test for Bug 919437</title>
6 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
8 </head>
9 <body>
10 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=919437">Mozilla Bug 919437</a>
11 <div id="content" style="display: none"></div>
12 <pre id="test">
13 <script type="application/javascript">
14 /** Test for Bug 919437 **/
16 SimpleTest.waitForExplicitFinish();
18 function run()
19 {
20 var oldWidth = window.innerWidth;
21 var oldHeight = window.innerHeight;
22 var newWidth = oldWidth / 2;
23 var newHeight = oldHeight / 2;
25 var utils = SpecialPowers.getDOMWindowUtils(window);
26 utils.setScrollPositionClampingScrollPortSize(newWidth, newHeight);
27 is(window.innerWidth, newWidth, "innerWidth not updated to scroll port width");
28 is(window.innerHeight, newHeight, "innerHeight not updated to scroll port height");
30 window.innerWidth = oldWidth;
31 window.innerHeight = oldHeight;
32 is(window.innerWidth, newWidth, "innerWidth clobbered by direct set");
33 is(window.innerHeight, newHeight, "innerHeight clobbered by direct set");
35 SimpleTest.finish();
36 }
38 window.addEventListener("load", run, false);
40 </script>
41 </pre>
42 </body>
43 </html>