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.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=620906 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 620906</title> |
michael@0 | 8 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 10 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 11 | </head> |
michael@0 | 12 | <body> |
michael@0 | 13 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=620906">Mozilla Bug 620906</a> |
michael@0 | 14 | <p id="display"></p> |
michael@0 | 15 | <div id="content"> |
michael@0 | 16 | <iframe src="data:text/html, |
michael@0 | 17 | <body contenteditable |
michael@0 | 18 | onmousedown=' |
michael@0 | 19 | document.designMode="on"; |
michael@0 | 20 | document.designMode="off"; |
michael@0 | 21 | ' |
michael@0 | 22 | > |
michael@0 | 23 | <div style='height: 1000px;'></div> |
michael@0 | 24 | </body>"> |
michael@0 | 25 | </iframe> |
michael@0 | 26 | </div> |
michael@0 | 27 | <pre id="test"> |
michael@0 | 28 | <script type="application/javascript"> |
michael@0 | 29 | |
michael@0 | 30 | /** Test for Bug 620906 **/ |
michael@0 | 31 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 32 | addLoadEvent(function() { |
michael@0 | 33 | var iframe = document.querySelector("iframe"); |
michael@0 | 34 | is(iframe.contentWindow.scrollY, 0, "Sanity check"); |
michael@0 | 35 | var rect = iframe.getBoundingClientRect(); |
michael@0 | 36 | setTimeout(function() { |
michael@0 | 37 | var onscroll = function () { |
michael@0 | 38 | iframe.contentWindow.removeEventListener("scroll", onscroll, false); |
michael@0 | 39 | isnot(iframe.contentWindow.scrollY, 0, "The scrollbar should work"); |
michael@0 | 40 | SimpleTest.finish(); |
michael@0 | 41 | } |
michael@0 | 42 | iframe.contentWindow.addEventListener("scroll", onscroll, false); |
michael@0 | 43 | synthesizeMouse(iframe, rect.width - 5, rect.height / 2, {}); |
michael@0 | 44 | }, 0); |
michael@0 | 45 | }); |
michael@0 | 46 | |
michael@0 | 47 | </script> |
michael@0 | 48 | </pre> |
michael@0 | 49 | </body> |
michael@0 | 50 | </html> |