Bug 1879774 [wpt PR 44524] - WebKit export: Implement field-sizing support for input...
[gecko.git] / layout / generic / test / test_bug503813.html
blobef34c9e2843acb8b6e90c7f80c1044eeb765506c
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=503813
5 -->
6 <head>
7 <title>Test for Bug 503813</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script src="/tests/SimpleTest/EventUtils.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 <style>
12 #a:after { content:"anonymous text"; display:block; height:10px; }
13 #a:hover:after { content:"hover content"; display:block; height:20px; }
14 #b:after { content:"anonymous text"; display:block; height:10px; }
15 #b:hover:after { content:url(file_Dolske.png); display:block; height:20px; }
16 </style>
17 </head>
18 <body>
19 <div id="content" style="width:300px;">
20 <div id="a" style="margin:10px;"></div>
21 <div id="b" style="margin:10px;"></div>
22 </div>
23 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=503813">Mozilla Bug 503813</a>
24 <pre id="test">
25 <script class="testbody" type="text/javascript">
26 /** Test for Bug 503813 **/
27 function test()
29 synthesizeMouse(document.getElementById("a"), 5, 5, { type: "mousemove" });
30 is(document.getElementById("a").getBoundingClientRect().height, 20,
31 "Expected hover style");
32 synthesizeMouse(document.getElementById("b"), 5, 5, { type: "mousemove" });
33 is(document.getElementById("b").getBoundingClientRect().height, 20,
34 "Expected hover style");
35 SimpleTest.finish();
37 // Run 'test' when we've exited paint suppression and done layout
38 window.onload = function() { setTimeout(test, 0); };
39 SimpleTest.waitForExplicitFinish();
40 </script>
41 </pre>
42 </body>
43 </html>