|
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" |
|
4 type="text/css"?> |
|
5 <!-- |
|
6 https://bugzilla.mozilla.org/show_bug.cgi?id=517396 |
|
7 --> |
|
8 <window title="Mozilla Bug 517396" |
|
9 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
|
10 |
|
11 <script type="application/javascript" |
|
12 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> |
|
13 |
|
14 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
15 <div id="content" style="display: none"> |
|
16 |
|
17 </div> |
|
18 <pre id="test"> |
|
19 </pre> |
|
20 </body> |
|
21 |
|
22 <script class="testbody" type="application/javascript"> |
|
23 <![CDATA[ |
|
24 |
|
25 SimpleTest.waitForExplicitFinish(); |
|
26 |
|
27 SimpleTest.waitForFocus(function () { |
|
28 // this test fails on Linux, bug 526236 |
|
29 if (navigator.platform.indexOf("Lin") != -1) { |
|
30 ok(true, "disabled on Linux"); |
|
31 SimpleTest.finish(); |
|
32 return; |
|
33 } |
|
34 |
|
35 var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]. |
|
36 getService(Components.interfaces.nsIWindowMediator); |
|
37 var win = wm.getMostRecentWindow("navigator:browser"); |
|
38 var oldWidth = win.outerWidth, oldHeight = win.outerHeight; |
|
39 win.maximize(); |
|
40 var newWidth = win.outerWidth, newHeight = win.outerHeight; |
|
41 win.moveBy(10, 0); |
|
42 var sizeShouldHaveChanged = !navigator.platform.match(/Mac/); |
|
43 var compFunc = sizeShouldHaveChanged ? isnot : is; |
|
44 var not = sizeShouldHaveChanged ? "" : "not "; |
|
45 compFunc(win.outerWidth, newWidth, "moving a maximized window should " + not + "have changed its width"); |
|
46 compFunc(win.outerHeight, newHeight, "moving a maximized window should " + not + "have changed its height"); |
|
47 win.restore(); |
|
48 is(win.outerWidth, oldWidth, "restored window has wrong width"); |
|
49 is(win.outerHeight, oldHeight, "restored window has wrong height"); |
|
50 SimpleTest.finish(); |
|
51 }); |
|
52 |
|
53 ]]> |
|
54 </script> |
|
55 |
|
56 </window> |