Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
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="Accessible XUL tree relations tests"> |
michael@0 | 8 | |
michael@0 | 9 | <script type="application/javascript" |
michael@0 | 10 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> |
michael@0 | 11 | |
michael@0 | 12 | <script type="application/javascript" |
michael@0 | 13 | src="../treeview.js" /> |
michael@0 | 14 | |
michael@0 | 15 | <script type="application/javascript" |
michael@0 | 16 | src="../common.js" /> |
michael@0 | 17 | <script type="application/javascript" |
michael@0 | 18 | src="../events.js" /> |
michael@0 | 19 | <script type="application/javascript" |
michael@0 | 20 | src="../relations.js" /> |
michael@0 | 21 | |
michael@0 | 22 | <script type="application/javascript"> |
michael@0 | 23 | <![CDATA[ |
michael@0 | 24 | //////////////////////////////////////////////////////////////////////////// |
michael@0 | 25 | // Test |
michael@0 | 26 | |
michael@0 | 27 | function doTest() |
michael@0 | 28 | { |
michael@0 | 29 | var treeNode = getNode("tree"); |
michael@0 | 30 | |
michael@0 | 31 | var tree = getAccessible(treeNode); |
michael@0 | 32 | var treeitem1 = tree.firstChild.nextSibling; |
michael@0 | 33 | testRelation(treeitem1, RELATION_NODE_CHILD_OF, [tree]); |
michael@0 | 34 | |
michael@0 | 35 | var treeitem2 = treeitem1.nextSibling; |
michael@0 | 36 | testRelation(treeitem2, RELATION_NODE_CHILD_OF, [tree]); |
michael@0 | 37 | |
michael@0 | 38 | var treeitem3 = treeitem2.nextSibling; |
michael@0 | 39 | testRelation(treeitem3, RELATION_NODE_CHILD_OF, [treeitem2]); |
michael@0 | 40 | |
michael@0 | 41 | var treeitem4 = treeitem3.nextSibling; |
michael@0 | 42 | testRelation(treeitem4, RELATION_NODE_CHILD_OF, [treeitem2]); |
michael@0 | 43 | |
michael@0 | 44 | var treeitem5 = treeitem4.nextSibling; |
michael@0 | 45 | testRelation(treeitem5, RELATION_NODE_CHILD_OF, [tree]); |
michael@0 | 46 | |
michael@0 | 47 | var treeitem6 = treeitem5.nextSibling; |
michael@0 | 48 | testRelation(treeitem6, RELATION_NODE_CHILD_OF, [tree]); |
michael@0 | 49 | |
michael@0 | 50 | testRelation(tree, RELATION_NODE_PARENT_OF, |
michael@0 | 51 | [treeitem1, treeitem2, treeitem5, treeitem6]); |
michael@0 | 52 | testRelation(treeitem2, RELATION_NODE_PARENT_OF, |
michael@0 | 53 | [treeitem3, treeitem4]); |
michael@0 | 54 | |
michael@0 | 55 | // treeitems and treecells shouldn't pick up relations from tree |
michael@0 | 56 | testRelation(treeitem1, RELATION_LABELLED_BY, null); |
michael@0 | 57 | testRelation(treeitem1.firstChild, RELATION_LABELLED_BY, null); |
michael@0 | 58 | |
michael@0 | 59 | SimpleTest.finish(); |
michael@0 | 60 | } |
michael@0 | 61 | |
michael@0 | 62 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 63 | addA11yXULTreeLoadEvent(doTest, "tree", new nsTreeTreeView()); |
michael@0 | 64 | ]]> |
michael@0 | 65 | </script> |
michael@0 | 66 | |
michael@0 | 67 | <hbox flex="1" style="overflow: auto;"> |
michael@0 | 68 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 69 | <a target="_blank" |
michael@0 | 70 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=503727" |
michael@0 | 71 | title="Reorganize implementation of XUL tree accessibility"> |
michael@0 | 72 | Bug 503727 |
michael@0 | 73 | </a> |
michael@0 | 74 | <a target="_blank" |
michael@0 | 75 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=527461" |
michael@0 | 76 | title="Implement RELATION_NODE_PARENT_OF"> |
michael@0 | 77 | Bug 527461 |
michael@0 | 78 | </a> |
michael@0 | 79 | <a target="_blank" |
michael@0 | 80 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=691248" |
michael@0 | 81 | title="XUL tree items shouldn't pick up relations from XUL tree"> |
michael@0 | 82 | Bug 691248 |
michael@0 | 83 | </a> |
michael@0 | 84 | <p id="display"></p> |
michael@0 | 85 | <div id="content" style="display: none"> |
michael@0 | 86 | </div> |
michael@0 | 87 | <pre id="test"> |
michael@0 | 88 | </pre> |
michael@0 | 89 | </body> |
michael@0 | 90 | |
michael@0 | 91 | <vbox flex="1"> |
michael@0 | 92 | <label control="tree" value="It's a tree"/> |
michael@0 | 93 | <tree id="tree" flex="1"> |
michael@0 | 94 | <treecols> |
michael@0 | 95 | <treecol id="col" flex="1" primary="true" label="column"/> |
michael@0 | 96 | <treecol id="col2" flex="1" label="column2"/> |
michael@0 | 97 | </treecols> |
michael@0 | 98 | <treechildren/> |
michael@0 | 99 | </tree> |
michael@0 | 100 | |
michael@0 | 101 | <vbox id="debug"/> |
michael@0 | 102 | </vbox> |
michael@0 | 103 | </hbox> |
michael@0 | 104 | |
michael@0 | 105 | </window> |
michael@0 | 106 |