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" type="text/css"?> |
michael@0 | 4 | |
michael@0 | 5 | <window title="Focus Scroll Tests" |
michael@0 | 6 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript" |
michael@0 | 9 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> |
michael@0 | 10 | <script type="application/javascript" |
michael@0 | 11 | src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> |
michael@0 | 12 | |
michael@0 | 13 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 14 | <div id="div" style="width:500px;height:48px;overflow:auto;font-size:16px;line-height:16px;"> |
michael@0 | 15 | aaaaaaaaa<br/>bbbbbbbb<br/> |
michael@0 | 16 | <a href="about:blank;" id="a">ccccccccc<br/>ddddddddd</a> |
michael@0 | 17 | </div> |
michael@0 | 18 | <p id="display"> |
michael@0 | 19 | </p> |
michael@0 | 20 | <div id="content" style="display: none"> |
michael@0 | 21 | </div> |
michael@0 | 22 | <pre id="test"> |
michael@0 | 23 | </pre> |
michael@0 | 24 | </body> |
michael@0 | 25 | |
michael@0 | 26 | <script> |
michael@0 | 27 | |
michael@0 | 28 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 29 | |
michael@0 | 30 | function runTest() |
michael@0 | 31 | { |
michael@0 | 32 | var fm = Components.classes["@mozilla.org/focus-manager;1"]. |
michael@0 | 33 | getService(Components.interfaces.nsIFocusManager); |
michael@0 | 34 | var div = document.getElementById('div'); |
michael@0 | 35 | var a = document.getElementById('a'); |
michael@0 | 36 | synthesizeMouse(a, 4, 4, { type: "mousedown" }, window); |
michael@0 | 37 | is(fm.focusedElement, a, |
michael@0 | 38 | "The anchor element isn't set focus by the mouse down event"); |
michael@0 | 39 | is(div.scrollTop, 0, |
michael@0 | 40 | "The div element was scrolled by the mouse down event"); |
michael@0 | 41 | SimpleTest.finish(); |
michael@0 | 42 | } |
michael@0 | 43 | |
michael@0 | 44 | SimpleTest.waitForFocus(runTest); |
michael@0 | 45 | |
michael@0 | 46 | </script> |
michael@0 | 47 | |
michael@0 | 48 | </window> |