OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Test that when image map areas have their shape or coordinate dynamically
altered, the test region changes.</title> | 2 <title>Test that when image map areas have their shape or coordinate dynamically
altered, the test region changes.</title> |
3 <script src="../../resources/testharness.js"></script> | 3 <script src="../resources/testharness.js"></script> |
4 <script src="../../resources/testharnessreport.js"></script> | 4 <script src="../resources/testharnessreport.js"></script> |
5 <img usemap="#m" style="height:400px; width:400px; border:1px solid red; positio
n:absolute; left:0; right:0" > | 5 <img usemap="#m" style="height:400px; width:400px; border:1px solid red; positio
n:absolute; left:0; right:0" > |
6 <map name="m"> | 6 <map name="m"> |
7 <area href="#"> | 7 <area href="#"> |
8 </map> | 8 </map> |
9 <script> | 9 <script> |
10 test(function() { | 10 test(function() { |
11 var area = document.querySelector('area'); | 11 var area = document.querySelector('area'); |
12 function checkPointInArea(shape, coords, x, y, equals) { | 12 function checkPointInArea(shape, coords, x, y, equals) { |
13 area.setAttribute('shape', shape); | 13 area.setAttribute('shape', shape); |
14 area.setAttribute('coords', coords); | 14 area.setAttribute('coords', coords); |
(...skipping 11 matching lines...) Expand all Loading... |
26 checkPointInArea('circle', '100, 100, 50', 200, 100, false); | 26 checkPointInArea('circle', '100, 100, 50', 200, 100, false); |
27 checkPointInArea('circle', '300, 300, 50', 100, 100, false); | 27 checkPointInArea('circle', '300, 300, 50', 100, 100, false); |
28 checkPointInArea('circle', '300, 300, 50', 300, 300, true); | 28 checkPointInArea('circle', '300, 300, 50', 300, 300, true); |
29 checkPointInArea('circle', '300, 300, 50', 320, 300, true); | 29 checkPointInArea('circle', '300, 300, 50', 320, 300, true); |
30 checkPointInArea('poly', '100, 100, 200, 100, 200, 200', 150, 150, true); | 30 checkPointInArea('poly', '100, 100, 200, 100, 200, 200', 150, 150, true); |
31 checkPointInArea('poly', '100, 100, 200, 100, 200, 200', 100, 150, false); | 31 checkPointInArea('poly', '100, 100, 200, 100, 200, 200', 100, 150, false); |
32 checkPointInArea('poly', '100, 100, 200, 100, 200, 200', 300, 300, false); | 32 checkPointInArea('poly', '100, 100, 200, 100, 200, 200', 300, 300, false); |
33 checkPointInArea('default', '', 300, 300, true); | 33 checkPointInArea('default', '', 300, 300, true); |
34 }); | 34 }); |
35 </script> | 35 </script> |
OLD | NEW |