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 src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
13 <body xmlns=
"http://www.w3.org/1999/xhtml">
14 <div id=
"content" style=
"display: none">
21 <script class=
"testbody" type=
"application/javascript">
24 SimpleTest.waitForExplicitFinish();
26 SimpleTest.waitForFocus(function () {
27 // this test fails on Linux, bug
526236
28 if (navigator.platform.includes(
"Lin")) {
29 ok(true,
"disabled on Linux");
34 const { Services } = ChromeUtils.import(
"resource://gre/modules/Services.jsm");
35 var win = Services.wm.getMostRecentWindow(
"navigator:browser");
36 var oldWidth = win.outerWidth, oldHeight = win.outerHeight;
38 var newWidth = win.outerWidth, newHeight = win.outerHeight;
40 var sizeShouldHaveChanged = !navigator.platform.match(/Mac/);
41 var compFunc = sizeShouldHaveChanged ? isnot : is;
42 var not = sizeShouldHaveChanged ?
"" :
"not ";
43 compFunc(win.outerWidth, newWidth,
"moving a maximized window should " + not +
"have changed its width");
44 compFunc(win.outerHeight, newHeight,
"moving a maximized window should " + not +
"have changed its height");
46 is(win.outerWidth, oldWidth,
"restored window has wrong width");
47 is(win.outerHeight, oldHeight,
"restored window has wrong height");