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=538242
8 <window title=
"Mozilla Bug 538242"
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 if (navigator.platform.startsWith(
"Win")) {
25 SimpleTest.expectAssertions(
0,
1);
28 SimpleTest.waitForExplicitFinish();
30 SimpleTest.waitForFocus(function () {
31 if (navigator.platform.includes(
"Lin")) {
32 ok(true,
"This test is disabled on Linux because it expects moving windows to be synchronous which is not guaranteed on Linux.");
37 var win = window.browsingContext.topChromeWindow.open(
38 "window_bug538242.xhtml",
"_blank",
39 "chrome,width=400,height=300,left=100,top=100");
40 SimpleTest.waitForFocus(function () {
41 is(win.screenX,
100,
"window should open at 100, 100");
42 is(win.screenY,
100,
"window should open at 100, 100");
43 var [oldX, oldY] = [win.screenX, win.screenY];
45 isnot(win.screenX, oldX,
"window should have moved to a point near 0, 0");
46 isnot(win.screenY, oldY,
"window should have moved to a point near 0, 0");