Bug 1708422: part 16) Rename `mozInlineSpellChecker::SpellCheckerTimeSlice` to `mozIn...
[gecko.git] / widget / tests / test_bug538242.xhtml
blob4608a74e355cfa2c20532f4508fa1e820a31e469
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=538242
7 -->
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">
16 </div>
17 <pre id="test">
18 </pre>
19 </body>
21 <script class="testbody" type="application/javascript">
22 <![CDATA[
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.");
33 SimpleTest.finish();
34 return;
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];
44 win.moveTo(0, 0);
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");
47 win.close();
48 SimpleTest.finish();
49 }, win);
50 });
52 ]]>
53 </script>
55 </window>