Bug 1688354 [wpt PR 27298] - Treat 'rem' as an absolute unit for font size, a=testonly
[gecko.git] / widget / tests / test_bug517396.xhtml
blobc99182c85ba822db9661d6ba8dc72a8e31bc60c1
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 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;
37 win.maximize();
38 var newWidth = win.outerWidth, newHeight = win.outerHeight;
39 win.moveBy(10, 0);
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");
45 win.restore();
46 is(win.outerWidth, oldWidth, "restored window has wrong width");
47 is(win.outerHeight, oldHeight, "restored window has wrong height");
48 SimpleTest.finish();
49 });
51 ]]>
52 </script>
54 </window>