OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <script> |
| 4 description("Test return value of getComputedStyle() for area tag."); |
| 5 window.jsTestIsAsync = true; |
| 6 var area; |
| 7 |
| 8 window.onload = function() { |
| 9 area = document.getElementById("areaTest"); |
| 10 if (window.eventSender) { |
| 11 var x = area.offsetParent.offsetLeft + area.offsetLeft + area.offsetWidth /
2; |
| 12 var y = area.offsetParent.offsetTop + area.offsetTop + area.offsetHeight / 2
; |
| 13 eventSender.mouseMoveTo(x, y); |
| 14 } |
| 15 } |
| 16 |
| 17 function onAreaHover() { |
| 18 shouldBeEqualToString("window.getComputedStyle(area, null).color", "rgb(0, 0, 2
55)"); |
| 19 finishJSTest(); |
| 20 } |
| 21 </script> |
| 22 <map name="imagemap1"> |
| 23 <area id="areaTest" onmouseover="onAreaHover()" shape="rect" coords="0, 0, 100
, 100"> |
| 24 </map> |
| 25 <img src="resources/greenbox-100px.png" border="0" align="left" usemap="#imagema
p1"> |
| 26 <style> |
| 27 area:hover { |
| 28 color: blue; |
| 29 } |
| 30 </style> |
OLD | NEW |