Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
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="/tests/SimpleTest/test.css" type="text/css"?> |
michael@0 | 4 | <!-- |
michael@0 | 5 | This test ensures that a resizer in content doesn't resize the window. |
michael@0 | 6 | --> |
michael@0 | 7 | <window title="XUL resizer in content test" |
michael@0 | 8 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 9 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/> |
michael@0 | 10 | <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"/> |
michael@0 | 11 | |
michael@0 | 12 | <!-- test results are displayed in the html:body --> |
michael@0 | 13 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 14 | </body> |
michael@0 | 15 | |
michael@0 | 16 | <!-- test code goes here --> |
michael@0 | 17 | <script type="application/javascript"><![CDATA[ |
michael@0 | 18 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 19 | |
michael@0 | 20 | function testResizer() |
michael@0 | 21 | { |
michael@0 | 22 | var oldScreenX = window.screenX; |
michael@0 | 23 | var oldScreenY = window.screenY; |
michael@0 | 24 | var oldWidth = window.outerWidth; |
michael@0 | 25 | var oldHeight = window.outerHeight; |
michael@0 | 26 | var resizer = document.getElementById("resizer"); |
michael@0 | 27 | synthesizeMouseAtCenter(resizer, { type:"mousedown" }); |
michael@0 | 28 | synthesizeMouse(resizer, 32, 32, { type:"mousemove" }); |
michael@0 | 29 | synthesizeMouse(resizer, 32, 32, { type:"mouseup" }); |
michael@0 | 30 | is(window.screenX, oldScreenX, "window not moved for non-chrome window screenX"); |
michael@0 | 31 | is(window.screenY, oldScreenY, "window not moved for non-chrome window screenY"); |
michael@0 | 32 | is(window.outerWidth, oldWidth, "window not moved for non-chrome window outerWidth"); |
michael@0 | 33 | is(window.outerHeight, oldHeight, "window not moved for non-chrome window outerHeight"); |
michael@0 | 34 | SimpleTest.finish(); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | SimpleTest.waitForFocus(testResizer); |
michael@0 | 38 | ]]></script> |
michael@0 | 39 | |
michael@0 | 40 | <resizer id="resizer" dir="bottomend" width="16" height="16"/> |
michael@0 | 41 | |
michael@0 | 42 | </window> |