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 | <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
michael@0 | 3 | <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> |
michael@0 | 4 | |
michael@0 | 5 | <window title="Menu Destruction Test" |
michael@0 | 6 | onload="setTimeout(runTests, 0);" |
michael@0 | 7 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 8 | |
michael@0 | 9 | <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 11 | |
michael@0 | 12 | <menu id="menu"> |
michael@0 | 13 | <menupopup onpopupshown="this.firstChild.open = true" onpopuphidden="if (event.target == this) done()"> |
michael@0 | 14 | <menu id="submenu" label="One"> |
michael@0 | 15 | <menupopup onpopupshown="submenuOpened();"> |
michael@0 | 16 | <menuitem label="Two"/> |
michael@0 | 17 | </menupopup> |
michael@0 | 18 | </menu> |
michael@0 | 19 | </menupopup> |
michael@0 | 20 | </menu> |
michael@0 | 21 | |
michael@0 | 22 | <script class="testbody" type="application/javascript"> |
michael@0 | 23 | <![CDATA[ |
michael@0 | 24 | |
michael@0 | 25 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 26 | |
michael@0 | 27 | function runTests() |
michael@0 | 28 | { |
michael@0 | 29 | $("menu").open = true; |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | function submenuOpened() |
michael@0 | 33 | { |
michael@0 | 34 | var submenu = $("submenu") |
michael@0 | 35 | is(submenu.getAttribute('_moz-menuactive'), "true", "menu highlighted"); |
michael@0 | 36 | submenu.hidden = true; |
michael@0 | 37 | $("menu").open = false; |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | function done() |
michael@0 | 41 | { |
michael@0 | 42 | ok(!$("submenu").hasAttribute('_moz-menuactive'), "menu unhighlighted"); |
michael@0 | 43 | SimpleTest.finish(); |
michael@0 | 44 | } |
michael@0 | 45 | |
michael@0 | 46 | ]]> |
michael@0 | 47 | </script> |
michael@0 | 48 | |
michael@0 | 49 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 50 | <p id="display"> |
michael@0 | 51 | </p> |
michael@0 | 52 | <div id="content" style="display: none"> |
michael@0 | 53 | </div> |
michael@0 | 54 | <pre id="test"> |
michael@0 | 55 | </pre> |
michael@0 | 56 | </body> |
michael@0 | 57 | |
michael@0 | 58 | </window> |