2 <script src=
"../../resources/js-test.js"></script>
4 description("Test return value of getComputedStyle() for area tag.");
5 window
.jsTestIsAsync
= true;
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
);
17 function onAreaHover() {
18 shouldBeEqualToString("window.getComputedStyle(area, null).color", "rgb(0, 0, 255)");
22 <map name=
"imagemap1">
23 <area id=
"areaTest" onmouseover=
"onAreaHover()" shape=
"rect" coords=
"0, 0, 100, 100">
25 <img src=
"resources/greenbox-100px.png" border=
"0" align=
"left" usemap=
"#imagemap1">