OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html lang="en"> | 2 <html lang="en"> |
3 <head> | 3 <head> |
4 <title>Switch between display block and none on :hover</title> | 4 <title>Switch between display block and none on :hover</title> |
5 <style> | 5 <style> |
6 .box { | 6 .box { |
7 width: 100px; | 7 width: 100px; |
8 height: 100px; | 8 height: 100px; |
9 } | 9 } |
10 #dummy { | 10 #dummy { |
(...skipping 13 matching lines...) Expand all Loading... |
24 #after_hoverTest { | 24 #after_hoverTest { |
25 background-color: blue; | 25 background-color: blue; |
26 color: white; | 26 color: white; |
27 padding: 10px; | 27 padding: 10px; |
28 } | 28 } |
29 </style> | 29 </style> |
30 | 30 |
31 <script src="../js/resources/js-test-pre.js"></script> | 31 <script src="../js/resources/js-test-pre.js"></script> |
32 </head> | 32 </head> |
33 | 33 |
| 34 <script type="text/javascript"> |
| 35 function elementHovered() { |
| 36 if (window.testRunner) |
| 37 document.getElementById("hoverTest").style.display = "no
ne"; |
| 38 } |
| 39 </script> |
| 40 |
34 <body> | 41 <body> |
35 <div id="dummy" class="box"></div> | 42 <div id="dummy" class="box"></div> |
36 » <div id="hoverTest" class="box">When hovered, this box's display will sw
itch from <b>block</b> to <b>none</b> (click on it and keep the mouse button pus
hed to avoid flicker and get a more clear view)</div> | 43 » <div id="hoverTest" class="box" onmouseover="elementHovered()">When hove
red, this box's display will switch from <b>block</b> to <b>none</b> (click on i
t and keep the mouse button pushed to avoid flicker and get a more clear view)</
div> |
37 <div id="after_hoverTest" class="box">This is here to show the layout be
ing recomputed</div> | 44 <div id="after_hoverTest" class="box">This is here to show the layout be
ing recomputed</div> |
38 | 45 |
39 <script type="text/javascript"> | 46 <script type="text/javascript"> |
40 if (window.testRunner) | 47 if (window.testRunner) |
41 testRunner.waitUntilDone(); | 48 testRunner.waitUntilDone(); |
42 | 49 |
43 function beginTest() { | 50 function beginTest() { |
44 if (window.eventSender) { | 51 if (window.eventSender) { |
45 var hoverTest = document.getElementById("hoverT
est"); | 52 var hoverTest = document.getElementById("hoverT
est"); |
46 | 53 |
(...skipping 20 matching lines...) Expand all Loading... |
67 | 74 |
68 if (window.testRunner) | 75 if (window.testRunner) |
69 testRunner.notifyDone(); | 76 testRunner.notifyDone(); |
70 } | 77 } |
71 } | 78 } |
72 | 79 |
73 beginTest(); | 80 beginTest(); |
74 </script> | 81 </script> |
75 </body> | 82 </body> |
76 </html> | 83 </html> |
OLD | NEW |