Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / replaced / image-map-2.html
blobe303a936eb03d198a812e24c9bd91bf8a50416e0
1 <map name="map">
2 <area shape="rect" coords="0,0,100,100" href="#">
3 </map>
4 <img id="target" style="width: 200; height: 200; border: solid black;" usemap="#map">
5 <p>
6 This box should turn green when hovered, except when the pointer is over the
7 top left quarter.
8 </p>
9 <p id="result"></p>
10 <script>
11 var target = document.getElementById("target");
12 target.addEventListener("mouseover", function(event) {
13 event.target.style.backgroundColor = "green";
14 document.getElementById("result").innerHTML = "Green";
15 }, true, false);
16 target.addEventListener("mouseout", function(event) {
17 event.target.style.backgroundColor = "";
18 document.getElementById("result").innerHTML = "Not green";
19 }, true, false);
21 if (window.eventSender) {
22 testRunner.dumpAsText();
23 document.body.offsetTop;
24 eventSender.mouseMoveTo(150, 150);
26 </script>