Bug 1867190 - Initialise the PHC allocate delay later r=glandium
[gecko.git] / layout / xul / test / test_resizer_incontent.xhtml
blob2d29dd3f8dc7e59cf09c0445afdf9d32eff9c78d
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
4 <!--
5 This test ensures that a resizer in content doesn't resize the window.
6 -->
7 <window title="XUL resizer in content test"
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
10 <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js" />
12 <!-- test results are displayed in the html:body -->
13 <body xmlns="http://www.w3.org/1999/xhtml">
14 </body>
16 <!-- test code goes here -->
17 <script type="application/javascript"><![CDATA[
18 SimpleTest.waitForExplicitFinish();
20 function testResizer()
22 var oldScreenX = window.screenX;
23 var oldScreenY = window.screenY;
24 var oldWidth = window.outerWidth;
25 var oldHeight = window.outerHeight;
26 var resizer = document.getElementById("resizer");
27 synthesizeMouseAtCenter(resizer, { type:"mousedown" });
28 synthesizeMouse(resizer, 32, 32, { type:"mousemove" });
29 synthesizeMouse(resizer, 32, 32, { type:"mouseup" });
30 is(window.screenX, oldScreenX, "window not moved for non-chrome window screenX");
31 is(window.screenY, oldScreenY, "window not moved for non-chrome window screenY");
32 is(window.outerWidth, oldWidth, "window not moved for non-chrome window outerWidth");
33 is(window.outerHeight, oldHeight, "window not moved for non-chrome window outerHeight");
34 SimpleTest.finish();
37 SimpleTest.waitForFocus(testResizer);
38 ]]></script>
40 <resizer id="resizer" dir="bottomend" width="16" height="16"/>
42 </window>