2 <?xml-stylesheet href=
"chrome://global/skin" type=
"text/css"?>
3 <window title=
"Mozilla Bug 522217"
5 xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
7 <script type=
"application/javascript"
8 src=
"chrome://mochikit/content/tests/SimpleTest/EventUtils.js" />
10 <body xmlns=
"http://www.w3.org/1999/xhtml" id=
"body">
13 <script class=
"testbody" type=
"application/javascript">
16 function ok(aCondition, aMessage)
18 window.opener.wrappedJSObject.SimpleTest.ok(aCondition, aMessage);
21 function is(aLeft, aRight, aMessage)
23 window.opener.wrappedJSObject.SimpleTest.is(aLeft, aRight, aMessage);
26 function isnot(aLeft, aRight, aMessage)
28 window.opener.wrappedJSObject.SimpleTest.isnot(aLeft, aRight, aMessage);
31 function executeSoon(aFct)
33 window.opener.wrappedJSObject.SimpleTest.executeSoon(aFct);
37 window.onfocus = function () {
38 window.onfocus = null;
39 var oldOuterWidth = window.outerWidth, oldOuterHeight = window.outerHeight;
40 var oldInnerWidth = window.innerWidth, oldInnerHeight = window.innerHeight;
41 document.documentElement.setAttribute(
"drawintitlebar",
"true");
43 executeSoon(function() {
44 is(window.outerWidth, oldOuterWidth,
"drawintitlebar shouldn't change the window's outerWidth");
45 is(window.outerHeight, oldOuterHeight,
"drawintitlebar shouldn't change the window's outerHeight");
46 is(window.innerWidth, oldOuterWidth,
"if drawintitlebar is set, innerWidth and outerWidth should be the same");
47 is(window.innerHeight, oldOuterHeight,
"if drawintitlebar is set, innerHeight and outerHeight should be the same");
48 window.fullScreen = true;
49 window.fullScreen = false;
50 is(window.outerWidth, oldOuterWidth,
"wrong outerWidth after fullscreen mode");
51 is(window.outerHeight, oldOuterHeight,
"wrong outerHeight after fullscreen mode");
52 is(window.innerWidth, oldOuterWidth,
"wrong innerWidth after fullscreen mode");
53 is(window.innerHeight, oldOuterHeight,
"wrong innerHeight after fullscreen mode");
54 document.documentElement.removeAttribute(
"drawintitlebar");
56 executeSoon(function() {
57 is(window.outerWidth, oldOuterWidth,
"wrong outerWidth after removing drawintitlebar");
58 is(window.outerHeight, oldOuterHeight,
"wrong outerHeight after removing drawintitlebar");
59 is(window.innerWidth, oldInnerWidth,
"wrong innerWidth after removing drawintitlebar");
60 is(window.innerHeight, oldInnerHeight,
"wrong innerHeight after removing drawintitlebar");
61 window.opener.wrappedJSObject.SimpleTest.finish();