2 <?xml-stylesheet href=
"chrome://global/skin" type=
"text/css"?>
3 <?xml-stylesheet href=
"chrome://mochikit/content/tests/SimpleTest/test.css"
6 https://bugzilla.mozilla.org/show_bug.cgi?id=517396
8 <window title=
"Mozilla Bug 517396"
9 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
11 <script type=
"application/javascript"
12 src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
14 <body xmlns=
"http://www.w3.org/1999/xhtml">
15 <div id=
"content" style=
"display: none">
22 <script class=
"testbody" type=
"application/javascript">
25 SimpleTest.waitForExplicitFinish();
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");
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;
40 var newWidth = win.outerWidth, newHeight = win.outerHeight;
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");
48 is(win.outerWidth, oldWidth,
"restored window has wrong width");
49 is(win.outerHeight, oldHeight,
"restored window has wrong height");