Bug 1261507 - Convert mochitest-chrome test_hover.html to mochitest-plain so it's runnable with e10s. draft convert_test
authorLeo Schwarz <evotopid@gmail.com>
Tue, 25 Oct 2016 22:26:43 +0200
branchconvert_test
changeset 429403 a51f611b27710aba4a4b971ec344a2ad01842a5f
parent 429062 25ea582e9521860301e3789350397b7a2bfc5be0
child 724607 856a7c0d0c3ebf4590df56517209a4d72e2bac35
push id33556
push userbmo:evotopid@gmail.com
push dateTue, 25 Oct 2016 20:28:00 +0000
bugs1261507
milestone52.0a1
Bug 1261507 - Convert mochitest-chrome test_hover.html to mochitest-plain so it's runnable with e10s. MozReview-Commit-ID: GSYnPJKfjqO
layout/style/test/chrome/chrome.ini
layout/style/test/chrome/hover_empty.html
layout/style/test/chrome/hover_helper.html
layout/style/test/chrome/test_hover.html
layout/style/test/hover_empty.html
layout/style/test/hover_helper.html
layout/style/test/mochitest.ini
layout/style/test/test_hover.html
--- a/layout/style/test/chrome/chrome.ini
+++ b/layout/style/test/chrome/chrome.ini
@@ -1,22 +1,19 @@
 [DEFAULT]
 skip-if = buildapp == 'b2g' || os == 'android'
 support-files =
   bug418986-2.js
   bug535806-css.css
   bug535806-html.html
   bug535806-xul.xul
-  hover_helper.html
   match.png
   mismatch.png
 
 [test_author_specified_style.html]
 [test_bug418986-2.xul]
 [test_bug1157097.html]
 [test_bug1160724.xul]
 [test_bug535806.xul]
 [test_display_mode.html]
 [test_display_mode_reflow.html]
 tags = fullscreen
-[test_hover.html]
-skip-if = buildapp == 'mulet'
 [test_moz_document_rules.html]
deleted file mode 100644
--- a/layout/style/test/chrome/hover_helper.html
+++ /dev/null
@@ -1,270 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for :hover</title>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-  <style type="text/css">
-
-  div#one { height: 10px; width: 10px; }
-  div#one:hover { background: #00f; }
-  div#one > div { height: 5px; width: 20px; }
-  div#one > div:hover { background: #f00; }
-
-  div#twoparent { overflow: hidden; height: 20px; }
-  div#two { width: 10px; height: 10px; }
-  div#two:hover { margin-left: 5px; background: #0f0; }
-  div#two + iframe { width: 50px; height: 10px; }
-  div#two:hover + iframe { width: 100px; }
-
-  </style>
-</head>
-<!-- need a set timeout because we need things to start after painting suppression ends -->
-<body onload="setTimeout(step1, 0)">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
-<div id="display" style="position: absolute; top: 0; left: 0; width: 300px; height: 300px">
-
-  <div id="one"><div></div></div>
-
-  <div id="twoparent">
-    <div id="two"></div>
-    <iframe id="twoi" src="hover_empty.html"></iframe>
-    <div style="width: 5000px; height: 10px;"></div>
-  </div>
-
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-var imports = [ "SimpleTest", "is", "isnot", "ok" ];
-for (var name of imports) {
-    window[name] = window.opener.wrappedJSObject[name];
-}
-
-var div = document.getElementById("display");
-var divtwo = document.getElementById("two");
-var iframe = document.getElementById("twoi");
-var divtwoparent = document.getElementById("twoparent");
-
-iframe.contentDocument.open();
-iframe.contentDocument.write("<style type='text/css'>html, body { margin: 0; padding: 0; }<\/style><body>");
-iframe.contentDocument.close();
-
-var moveEvent = { type: "mousemove", clickCount: "0" };
-
-function setResize(str) {
-  var handler = function() {
-    iframe.contentWindow.removeEventListener("resize", arguments.callee, false);
-    setTimeout(str, 100);
-  };
-  iframe.contentWindow.addEventListener("resize", handler, false);
-}
-
-function step1() {
-    /** test basic hover **/
-    var divone = document.getElementById("one");
-    synthesizeMouse(divone, 5, 7, moveEvent, window);
-    is(getComputedStyle(divone, "").backgroundColor, "rgb(0, 0, 255)",
-       ":hover applies");
-    is(getComputedStyle(divone.firstChild, "").backgroundColor, "transparent",
-       ":hover does not apply");
-    synthesizeMouse(divone, 5, 2, moveEvent, window);
-    is(getComputedStyle(divone, "").backgroundColor, "rgb(0, 0, 255)",
-       ":hover applies hierarchically");
-    is(getComputedStyle(divone.firstChild, "").backgroundColor, "rgb(255, 0, 0)",
-       ":hover applies");
-    synthesizeMouse(divone, 15, 7, moveEvent, window);
-    is(getComputedStyle(divone, "").backgroundColor, "transparent",
-       ":hover does not apply");
-    is(getComputedStyle(divone.firstChild, "").backgroundColor, "transparent",
-       ":hover does not apply");
-    synthesizeMouse(divone, 15, 2, moveEvent, window);
-    is(getComputedStyle(divone, "").backgroundColor, "rgb(0, 0, 255)",
-       ":hover applies hierarchically");
-    is(getComputedStyle(divone.firstChild, "").backgroundColor, "rgb(255, 0, 0)",
-       ":hover applies");
-
-    /** Test for Bug 302561 **/
-    setResize("step2();");
-    is(iframe.contentDocument.body.offsetWidth, 50,
-       ":hover does not apply (iframe body width)");
-    synthesizeMouse(divtwoparent, 7, 5, moveEvent, window);
-    is(iframe.contentDocument.body.offsetWidth, 100,
-       ":hover applies (iframe body width)");
-}
-
-var step2called = false;
-function step2() {
-    is(step2called, false, "step2 called only once");
-    step2called = true;
-    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
-       ":hover applies");
-    is(iframe.contentDocument.body.offsetWidth, 100,
-       ":hover applies (iframe body width)");
-    setResize("step3()");
-    synthesizeMouse(divtwoparent, 2, 5, moveEvent, window);
-    is(iframe.contentDocument.body.offsetWidth, 50,
-       ":hover does not apply (iframe body width)");
-}
-
-var step3called = false;
-function step3() {
-    is(step3called, false, "step3 called only once");
-    step3called = true;
-    if (getComputedStyle(iframe, "").width == "100px") {
-        // The two resize events may be coalesced into a single one.
-        step4();
-        return;
-    }
-    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
-       ":hover does not apply");
-    setResize("step4()");
-    /* expect to get a second resize from the oscillation */
-}
-
-var step4called = false;
-function step4() {
-    is(step4called, false, "step4 called only once (more than two cycles of oscillation)");
-    if (step4called)
-        return;
-    step4called = true;
-    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
-       ":hover applies");
-    setTimeout(step5, 500); // time to detect oscillations if they exist
-}
-
-var step5called = false;
-function step5() {
-    is(step5called, false, "step5 called only once");
-    step5called = true;
-    setResize("step6()");
-    synthesizeMouse(divtwoparent, 25, 5, moveEvent, window);
-}
-
-var step6called = false;
-function step6() {
-    is(step6called, false, "step6 called only once");
-    step6called = true;
-    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
-       ":hover does not apply");
-    synthesizeMouse(divtwoparent, 2, 5, moveEvent, window);
-    setTimeout(step7, 500); // time to detect oscillations if they exist
-}
-
-var step7called = false;
-function step7() {
-    is(step7called, false, "step7 called only once (more than two cycles of oscillation)");
-    if (step7called)
-        return;
-    step7called = true;
-    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
-       ":hover does not apply");
-    setTimeout(step8, 500); // time to detect oscillations if they exist
-}
-
-/* test the same case with scrolltop */
-
-var step8called = false;
-function step8() {
-    is(step8called, false, "step8 called only once");
-    step8called = true;
-    iframe.contentDocument.body.removeAttribute("onresize");
-    /* move the mouse out of the way */
-    synthesizeMouse(divtwoparent, 200, 5, moveEvent, window);
-    divtwoparent.scrollLeft = 5;
-    setResize("step9()");
-    synthesizeMouse(divtwoparent, 2, 5, moveEvent, window);
-    /* mouse now over 7, 5 */
-}
-
-var step9called = false;
-function step9() {
-    is(step9called, false, "step9 called only once");
-    step9called = true;
-    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
-       ":hover applies");
-    setResize("step10()");
-    divtwoparent.scrollLeft = 0; /* mouse now over 2,5 */
-}
-
-var step10called = false;
-function step10() {
-    is(step10called, false, "step10 called only once");
-    step10called = true;
-    if (getComputedStyle(iframe, "").width == "100px") {
-        // The two resize events may be coalesced into a single one.
-        step11();
-        return;
-    }
-    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
-       ":hover does not apply");
-    setResize("step11()");
-    /* expect to get a second resize from the oscillation */
-}
-
-var step11called = false;
-function step11() {
-    is(step11called, false, "step11 called only once (more than two cycles of oscillation)");
-    if (step11called)
-        return;
-    step11called = true;
-    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
-       ":hover applies");
-    setTimeout(step12, 500); // time to detect oscillations if they exist
-}
-
-var step12called = false;
-function step12() {
-    is(step12called, false, "step12 called only once");
-    step12called = true;
-    setResize("step13()");
-    divtwoparent.scrollLeft = 25; /* mouse now over 27,5 */
-}
-
-var step13called = false;
-function step13() {
-    is(step13called, false, "step13 called only once");
-    step13called = true;
-    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
-       ":hover does not apply");
-    setResize("step14()");
-    divtwoparent.scrollLeft = 0; /* mouse now over 2,5 */
-}
-
-var step14called = false;
-function step14() {
-    is(step14called, false, "step14 called only once");
-    step14called = true;
-    if (getComputedStyle(iframe, "").width == "50px") {
-        // The two resize events may be coalesced into a single one.
-        step15();
-        return;
-    }
-    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
-       ":hover applies");
-    setResize("step15()");
-    /* expect to get a second resize from the oscillation */
-}
-
-var step15called = false;
-function step15() {
-    is(step15called, false, "step15 called only once (more than two cycles of oscillation)");
-    if (step15called)
-        return;
-    step15called = true;
-    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
-       ":hover does not apply");
-    setTimeout(finish, 500); // time to detect oscillations if they exist
-}
-
-function finish() {
-    document.getElementById("display").style.display = "none";
-
-    var tester = window.SimpleTest;
-    window.close();
-    tester.finish();
-}
-
-</script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/layout/style/test/chrome/test_hover.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for :hover</title>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-</head>
-<body onload="startTest();">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
-<div id="display">
-
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-SimpleTest.waitForExplicitFinish();
-
-function startTest() {
-  // Run the test in a separate window so that the parent document doesn't have
-  // anything that will cause reflows and dispatch synth mouse moves when we don't
-  // want them and disturb our test.
-  window.open("hover_helper.html", "hover_helper", "width=200,height=300");
-}
-
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/chrome/hover_empty.html
rename to layout/style/test/hover_empty.html
new file mode 100644
--- /dev/null
+++ b/layout/style/test/hover_helper.html
@@ -0,0 +1,270 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>Test for :hover</title>
+  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
+  <style type="text/css">
+
+  div#one { height: 10px; width: 10px; }
+  div#one:hover { background: #00f; }
+  div#one > div { height: 5px; width: 20px; }
+  div#one > div:hover { background: #f00; }
+
+  div#twoparent { overflow: hidden; height: 20px; }
+  div#two { width: 10px; height: 10px; }
+  div#two:hover { margin-left: 5px; background: #0f0; }
+  div#two + iframe { width: 50px; height: 10px; }
+  div#two:hover + iframe { width: 100px; }
+
+  </style>
+</head>
+<!-- need a set timeout because we need things to start after painting suppression ends -->
+<body onload="setTimeout(step1, 0)">
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
+<div id="display" style="position: absolute; top: 0; left: 0; width: 300px; height: 300px">
+
+  <div id="one"><div></div></div>
+
+  <div id="twoparent">
+    <div id="two"></div>
+    <iframe id="twoi" src="hover_empty.html"></iframe>
+    <div style="width: 5000px; height: 10px;"></div>
+  </div>
+
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+var imports = [ "SimpleTest", "is", "isnot", "ok" ];
+for (var name of imports) {
+    window[name] = window.opener[name];
+}
+
+var div = document.getElementById("display");
+var divtwo = document.getElementById("two");
+var iframe = document.getElementById("twoi");
+var divtwoparent = document.getElementById("twoparent");
+
+iframe.contentDocument.open();
+iframe.contentDocument.write("<style type='text/css'>html, body { margin: 0; padding: 0; }<\/style><body>");
+iframe.contentDocument.close();
+
+var moveEvent = { type: "mousemove", clickCount: "0" };
+
+function setResize(str) {
+  var handler = function() {
+    iframe.contentWindow.removeEventListener("resize", arguments.callee, false);
+    setTimeout(str, 100);
+  };
+  iframe.contentWindow.addEventListener("resize", handler, false);
+}
+
+function step1() {
+    /** test basic hover **/
+    var divone = document.getElementById("one");
+    synthesizeMouse(divone, 5, 7, moveEvent, window);
+    is(getComputedStyle(divone, "").backgroundColor, "rgb(0, 0, 255)",
+       ":hover applies");
+    is(getComputedStyle(divone.firstChild, "").backgroundColor, "transparent",
+       ":hover does not apply");
+    synthesizeMouse(divone, 5, 2, moveEvent, window);
+    is(getComputedStyle(divone, "").backgroundColor, "rgb(0, 0, 255)",
+       ":hover applies hierarchically");
+    is(getComputedStyle(divone.firstChild, "").backgroundColor, "rgb(255, 0, 0)",
+       ":hover applies");
+    synthesizeMouse(divone, 15, 7, moveEvent, window);
+    is(getComputedStyle(divone, "").backgroundColor, "transparent",
+       ":hover does not apply");
+    is(getComputedStyle(divone.firstChild, "").backgroundColor, "transparent",
+       ":hover does not apply");
+    synthesizeMouse(divone, 15, 2, moveEvent, window);
+    is(getComputedStyle(divone, "").backgroundColor, "rgb(0, 0, 255)",
+       ":hover applies hierarchically");
+    is(getComputedStyle(divone.firstChild, "").backgroundColor, "rgb(255, 0, 0)",
+       ":hover applies");
+
+    /** Test for Bug 302561 **/
+    setResize("step2();");
+    is(iframe.contentDocument.body.offsetWidth, 50,
+       ":hover does not apply (iframe body width)");
+    synthesizeMouse(divtwoparent, 7, 5, moveEvent, window);
+    is(iframe.contentDocument.body.offsetWidth, 100,
+       ":hover applies (iframe body width)");
+}
+
+var step2called = false;
+function step2() {
+    is(step2called, false, "step2 called only once");
+    step2called = true;
+    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
+       ":hover applies");
+    is(iframe.contentDocument.body.offsetWidth, 100,
+       ":hover applies (iframe body width)");
+    setResize("step3()");
+    synthesizeMouse(divtwoparent, 2, 5, moveEvent, window);
+    is(iframe.contentDocument.body.offsetWidth, 50,
+       ":hover does not apply (iframe body width)");
+}
+
+var step3called = false;
+function step3() {
+    is(step3called, false, "step3 called only once");
+    step3called = true;
+    if (getComputedStyle(iframe, "").width == "100px") {
+        // The two resize events may be coalesced into a single one.
+        step4();
+        return;
+    }
+    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
+       ":hover does not apply");
+    setResize("step4()");
+    /* expect to get a second resize from the oscillation */
+}
+
+var step4called = false;
+function step4() {
+    is(step4called, false, "step4 called only once (more than two cycles of oscillation)");
+    if (step4called)
+        return;
+    step4called = true;
+    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
+       ":hover applies");
+    setTimeout(step5, 500); // time to detect oscillations if they exist
+}
+
+var step5called = false;
+function step5() {
+    is(step5called, false, "step5 called only once");
+    step5called = true;
+    setResize("step6()");
+    synthesizeMouse(divtwoparent, 25, 5, moveEvent, window);
+}
+
+var step6called = false;
+function step6() {
+    is(step6called, false, "step6 called only once");
+    step6called = true;
+    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
+       ":hover does not apply");
+    synthesizeMouse(divtwoparent, 2, 5, moveEvent, window);
+    setTimeout(step7, 500); // time to detect oscillations if they exist
+}
+
+var step7called = false;
+function step7() {
+    is(step7called, false, "step7 called only once (more than two cycles of oscillation)");
+    if (step7called)
+        return;
+    step7called = true;
+    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
+       ":hover does not apply");
+    setTimeout(step8, 500); // time to detect oscillations if they exist
+}
+
+/* test the same case with scrolltop */
+
+var step8called = false;
+function step8() {
+    is(step8called, false, "step8 called only once");
+    step8called = true;
+    iframe.contentDocument.body.removeAttribute("onresize");
+    /* move the mouse out of the way */
+    synthesizeMouse(divtwoparent, 200, 5, moveEvent, window);
+    divtwoparent.scrollLeft = 5;
+    setResize("step9()");
+    synthesizeMouse(divtwoparent, 2, 5, moveEvent, window);
+    /* mouse now over 7, 5 */
+}
+
+var step9called = false;
+function step9() {
+    is(step9called, false, "step9 called only once");
+    step9called = true;
+    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
+       ":hover applies");
+    setResize("step10()");
+    divtwoparent.scrollLeft = 0; /* mouse now over 2,5 */
+}
+
+var step10called = false;
+function step10() {
+    is(step10called, false, "step10 called only once");
+    step10called = true;
+    if (getComputedStyle(iframe, "").width == "100px") {
+        // The two resize events may be coalesced into a single one.
+        step11();
+        return;
+    }
+    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
+       ":hover does not apply");
+    setResize("step11()");
+    /* expect to get a second resize from the oscillation */
+}
+
+var step11called = false;
+function step11() {
+    is(step11called, false, "step11 called only once (more than two cycles of oscillation)");
+    if (step11called)
+        return;
+    step11called = true;
+    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
+       ":hover applies");
+    setTimeout(step12, 500); // time to detect oscillations if they exist
+}
+
+var step12called = false;
+function step12() {
+    is(step12called, false, "step12 called only once");
+    step12called = true;
+    setResize("step13()");
+    divtwoparent.scrollLeft = 25; /* mouse now over 27,5 */
+}
+
+var step13called = false;
+function step13() {
+    is(step13called, false, "step13 called only once");
+    step13called = true;
+    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
+       ":hover does not apply");
+    setResize("step14()");
+    divtwoparent.scrollLeft = 0; /* mouse now over 2,5 */
+}
+
+var step14called = false;
+function step14() {
+    is(step14called, false, "step14 called only once");
+    step14called = true;
+    if (getComputedStyle(iframe, "").width == "50px") {
+        // The two resize events may be coalesced into a single one.
+        step15();
+        return;
+    }
+    is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
+       ":hover applies");
+    setResize("step15()");
+    /* expect to get a second resize from the oscillation */
+}
+
+var step15called = false;
+function step15() {
+    is(step15called, false, "step15 called only once (more than two cycles of oscillation)");
+    if (step15called)
+        return;
+    step15called = true;
+    is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
+       ":hover does not apply");
+    setTimeout(finish, 500); // time to detect oscillations if they exist
+}
+
+function finish() {
+    document.getElementById("display").style.display = "none";
+
+    var tester = window.SimpleTest;
+    window.close();
+    tester.finish();
+}
+
+</script>
+</pre>
+</body>
+</html>
--- a/layout/style/test/mochitest.ini
+++ b/layout/style/test/mochitest.ini
@@ -5,16 +5,18 @@ support-files =
   ccd.sjs
   ccd-standards.html
   chrome/bug418986-2.js
   chrome/match.png
   chrome/mismatch.png
   descriptor_database.js
   display_mode_reflow_iframe.html
   empty.html
+  hover_empty.html
+  hover_helper.html
   media_queries_dynamic_xbl_binding.xml
   media_queries_dynamic_xbl_iframe.html
   media_queries_dynamic_xbl_style.css
   media_queries_iframe.html
   neverending_font_load.sjs
   neverending_stylesheet_load.sjs
   post-redirect-1.css
   post-redirect-2.css
@@ -197,16 +199,18 @@ support-files =
   file_font_loading_api_vframe.html
 [test_garbage_at_end_of_declarations.html]
 skip-if = (toolkit == 'gonk' && debug) # Bug 1186440
 [test_grid_container_shorthands.html]
 [test_grid_item_shorthands.html]
 [test_grid_shorthand_serialization.html]
 [test_grid_computed_values.html]
 [test_group_insertRule.html]
+[test_hover.html]
+skip-if = buildapp == 'mulet'
 [test_hover_quirk.html]
 [test_html_attribute_computed_values.html]
 [test_ident_escaping.html]
 [test_inherit_computation.html]
 skip-if = toolkit == 'android'
 [test_inherit_storage.html]
 [test_initial_computation.html]
 skip-if = toolkit == 'android'
new file mode 100644
--- /dev/null
+++ b/layout/style/test/test_hover.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>Test for :hover</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body onload="startTest();">
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
+<div id="display">
+
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+SimpleTest.waitForExplicitFinish();
+
+function startTest() {
+  // Run the test in a separate window so that the parent document doesn't have
+  // anything that will cause reflows and dispatch synth mouse moves when we don't
+  // want them and disturb our test.
+  window.open("hover_helper.html", "hover_helper", "width=200,height=300");
+}
+
+</script>
+</pre>
+</body>
+</html>