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" |
michael@0 | 4 | type="text/css"?> |
michael@0 | 5 | |
michael@0 | 6 | <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 7 | title="Tabbox focus testing"> |
michael@0 | 8 | |
michael@0 | 9 | <script type="application/javascript" |
michael@0 | 10 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> |
michael@0 | 13 | |
michael@0 | 14 | <script type="application/javascript" |
michael@0 | 15 | src="../common.js" /> |
michael@0 | 16 | <script type="application/javascript" |
michael@0 | 17 | src="../role.js" /> |
michael@0 | 18 | <script type="application/javascript" |
michael@0 | 19 | src="../states.js" /> |
michael@0 | 20 | <script type="application/javascript" |
michael@0 | 21 | src="../events.js" /> |
michael@0 | 22 | |
michael@0 | 23 | <script type="application/javascript"> |
michael@0 | 24 | //gA11yEventDumpID = "eventdump"; // debug stuff |
michael@0 | 25 | //gA11yEventDumpToConsole = true; // debug stuff |
michael@0 | 26 | |
michael@0 | 27 | var gQueue = null; |
michael@0 | 28 | function doTests() |
michael@0 | 29 | { |
michael@0 | 30 | if (MAC) { |
michael@0 | 31 | todo(false, "Tests disabled because of imminent failure."); |
michael@0 | 32 | SimpleTest.finish(); |
michael@0 | 33 | return; |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | // Test focus events. |
michael@0 | 37 | gQueue = new eventQueue(); |
michael@0 | 38 | |
michael@0 | 39 | var textbox = getNode("textbox").inputField; |
michael@0 | 40 | gQueue.push(new synthClick("tab1", new focusChecker("tab1"))); |
michael@0 | 41 | gQueue.push(new synthTab("tab1", new focusChecker("checkbox1"))); |
michael@0 | 42 | gQueue.push(new synthKey("tab1", "VK_TAB", { ctrlKey: true }, |
michael@0 | 43 | new focusChecker(textbox))); |
michael@0 | 44 | gQueue.push(new synthKey("tab2", "VK_TAB", { ctrlKey: true }, |
michael@0 | 45 | new focusChecker("tab3"))); |
michael@0 | 46 | gQueue.push(new synthKey("tab3", "VK_TAB", { ctrlKey: true }, |
michael@0 | 47 | new focusChecker("tab1"))); |
michael@0 | 48 | |
michael@0 | 49 | gQueue.invoke(); // Will call SimpleTest.finish(); |
michael@0 | 50 | } |
michael@0 | 51 | |
michael@0 | 52 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 53 | addA11yLoadEvent(doTests); |
michael@0 | 54 | </script> |
michael@0 | 55 | |
michael@0 | 56 | <hbox flex="1" style="overflow: auto;"> |
michael@0 | 57 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 58 | <a target="_blank" |
michael@0 | 59 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=370396" |
michael@0 | 60 | title="Control+Tab to an empty tab panel in a tabbox causes focus to leave the tabbox"> |
michael@0 | 61 | Mozilla Bug 370396 |
michael@0 | 62 | </a> |
michael@0 | 63 | <p id="display"></p> |
michael@0 | 64 | <div id="content" style="display: none"></div> |
michael@0 | 65 | <pre id="test"> |
michael@0 | 66 | </pre> |
michael@0 | 67 | </body> |
michael@0 | 68 | |
michael@0 | 69 | <vbox flex="1"> |
michael@0 | 70 | <tabbox> |
michael@0 | 71 | <tabs> |
michael@0 | 72 | <tab id="tab1" label="Tab1" selected="true"/> |
michael@0 | 73 | <tab id="tab2" label="Tab2" /> |
michael@0 | 74 | <tab id="tab3" label="Tab3" /> |
michael@0 | 75 | </tabs> |
michael@0 | 76 | <tabpanels> |
michael@0 | 77 | <tabpanel orient="vertical"> |
michael@0 | 78 | <groupbox orient="vertical"> |
michael@0 | 79 | <checkbox id="checkbox1" label="Monday" width="75"/> |
michael@0 | 80 | <checkbox label="Tuesday" width="75"/> |
michael@0 | 81 | <checkbox label="Wednesday" width="75"/> |
michael@0 | 82 | <checkbox label="Thursday" width="75"/> |
michael@0 | 83 | <checkbox label="Friday" width="75"/> |
michael@0 | 84 | <checkbox label="Saturday" width="75"/> |
michael@0 | 85 | <checkbox label="Sunday" width="75"/> |
michael@0 | 86 | </groupbox> |
michael@0 | 87 | |
michael@0 | 88 | <spacer style="height: 10px" /> |
michael@0 | 89 | <label value="Label After checkboxes" /> |
michael@0 | 90 | </tabpanel> |
michael@0 | 91 | <tabpanel orient="vertical"> |
michael@0 | 92 | <textbox id="textbox" /> |
michael@0 | 93 | </tabpanel> |
michael@0 | 94 | <tabpanel orient="vertical"> |
michael@0 | 95 | <description>Tab 3 content</description> |
michael@0 | 96 | </tabpanel> |
michael@0 | 97 | </tabpanels> |
michael@0 | 98 | </tabbox> |
michael@0 | 99 | |
michael@0 | 100 | <vbox id="eventdump"/> |
michael@0 | 101 | </vbox> |
michael@0 | 102 | </hbox> |
michael@0 | 103 | </window> |