OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <meta charset=utf-8> |
| 3 <title>HTMLAreaElement shape</title> |
| 4 <script src=../../resources/testharness.js></script> |
| 5 <script src=../../resources/testharnessreport.js></script> |
| 6 <style> |
| 7 body { margin: 0 } |
| 8 </style> |
| 9 <img src=resources/images/blue-border.png usemap=#x id=img width=300 height=300> |
| 10 <map name=x><area id=area></map> |
| 11 <script src=resources/hit-test.js></script> |
| 12 <script> |
| 13 var tests = [ |
| 14 {desc: 'missing value default', shape: null, coords: "2,2,10,10", hit: hitRect
}, |
| 15 {desc: 'missing value default', shape: null, coords: "20,40,10", hit: hitNone}
, |
| 16 {desc: 'missing value default', shape: null, coords: null, hit: hitNone}, |
| 17 {desc: 'invalid value default', shape: 'foobar invalid', coords: "2,2,10,10",
hit: hitRect}, |
| 18 {desc: 'invalid value default', shape: '', coords: "2,2,10,10", hit: hitRect}, |
| 19 |
| 20 {desc: 'empty string', shape: 'default', coords: "", hit: hitAll}, |
| 21 {desc: 'omitted coords', shape: 'DEFAULT', coords: null, hit: hitAll}, |
| 22 |
| 23 {desc: 'simple', shape: 'circle', coords: "20,40,10", hit: hitCircle}, |
| 24 {desc: 'simple', shape: 'circ', coords: "20,40,10", hit: hitCircle}, |
| 25 {desc: 'simple', shape: 'CIRCLE', coords: "20,40,10", hit: hitCircle}, |
| 26 {desc: 'simple', shape: 'CIRC', coords: "20,40,10", hit: hitCircle}, |
| 27 {desc: 'LATIN CAPITAL LETTER I WITH DOT ABOVE', shape: 'C\u0130RCLE', coords:
"20,40,10", hit: hitNone}, |
| 28 {desc: 'LATIN SMALL LETTER DOTLESS I', shape: 'c\u0131rcle', coords: "20,40,10
", hit: hitNone}, |
| 29 |
| 30 {desc: 'simple', shape: 'poly', coords: "100,100,120,100,100,120", hit: hitPol
y}, |
| 31 {desc: 'simple', shape: 'polygon', coords: "100,100,120,100,100,120", hit: hit
Poly}, |
| 32 ]; |
| 33 </script> |
OLD | NEW |