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 | <?xml version="1.0"?> |
michael@0 | 2 | |
michael@0 | 3 | <!-- This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | - License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> |
michael@0 | 6 | |
michael@0 | 7 | |
michael@0 | 8 | <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
michael@0 | 9 | <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> |
michael@0 | 10 | |
michael@0 | 11 | <window title="Textbox with placeholder undo test" width="500" height="600" |
michael@0 | 12 | onload="doTest();" |
michael@0 | 13 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 14 | <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 15 | <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 16 | |
michael@0 | 17 | <hbox> |
michael@0 | 18 | <textbox id="t1" placeholder="empty"/> |
michael@0 | 19 | </hbox> |
michael@0 | 20 | |
michael@0 | 21 | <!-- test results are displayed in the html:body --> |
michael@0 | 22 | <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"> |
michael@0 | 23 | <p id="display"> |
michael@0 | 24 | </p> |
michael@0 | 25 | <div id="content" style="display: none"> |
michael@0 | 26 | </div> |
michael@0 | 27 | <pre id="test"> |
michael@0 | 28 | </pre> |
michael@0 | 29 | </body> |
michael@0 | 30 | |
michael@0 | 31 | <!-- test code goes here --> |
michael@0 | 32 | <script type="application/javascript"><![CDATA[ |
michael@0 | 33 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 34 | |
michael@0 | 35 | function doTest() { |
michael@0 | 36 | var t1 = $("t1"); |
michael@0 | 37 | t1.focus(); |
michael@0 | 38 | var t1Enabled = {}; |
michael@0 | 39 | var t1CanUndo = {}; |
michael@0 | 40 | t1.editor.canUndo(t1Enabled, t1CanUndo); |
michael@0 | 41 | ok(!t1CanUndo.value, "undo correctly disabled when no user edits"); |
michael@0 | 42 | SimpleTest.finish(); |
michael@0 | 43 | } |
michael@0 | 44 | |
michael@0 | 45 | ]]></script> |
michael@0 | 46 | |
michael@0 | 47 | </window> |