Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / tests / test_bug517396.xhtml
blobc88baf49ab4a139f1c02a9cf9518e5e914705c63
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">
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">
16 </div>
17 <pre id="test">
18 </pre>
19 </body>
21 <script class="testbody" type="application/javascript">
22 <![CDATA[
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");
30 SimpleTest.finish();
31 return;
34 var win = Services.wm.getMostRecentWindow("navigator:browser");
35 var oldWidth = win.outerWidth, oldHeight = win.outerHeight;
36 win.maximize();
37 var newWidth = win.outerWidth, newHeight = win.outerHeight;
38 win.moveBy(10, 0);
39 var sizeShouldHaveChanged = !navigator.platform.match(/Mac/);
40 var compFunc = sizeShouldHaveChanged ? isnot : is;
41 var not = sizeShouldHaveChanged ? "" : "not ";
42 compFunc(win.outerWidth, newWidth, "moving a maximized window should " + not + "have changed its width");
43 compFunc(win.outerHeight, newHeight, "moving a maximized window should " + not + "have changed its height");
44 win.restore();
45 is(win.outerWidth, oldWidth, "restored window has wrong width");
46 is(win.outerHeight, oldHeight, "restored window has wrong height");
47 SimpleTest.finish();
48 });
50 ]]>
51 </script>
53 </window>