OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <meta charset=utf-8> |
| 3 <title>HTMLAreaElement processing</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: 'too few numbers', shape: 'rect', coords: "2,2,10", hit: hitNone}, |
| 15 {desc: 'negative', shape: 'rect', coords: "-10,-10,10,10", hit: [[area, 1, 1],
[img, 299, 299]]}, |
| 16 {desc: 'empty string', shape: 'rect', coords: "", hit: hitNone}, |
| 17 {desc: 'omitted coords', shape: 'rect', coords: null, hit: hitNone}, |
| 18 {desc: 'first > third', shape: 'rect', coords: "10,2,2,10", hit: hitRect}, |
| 19 {desc: 'second > fourth', shape: 'rect', coords: "2,10,10,2", hit: hitRect}, |
| 20 {desc: 'first > third, second > fourth', shape: 'rect', coords: "10,10,2,2", h
it: hitRect}, |
| 21 |
| 22 {desc: 'negative', shape: 'default', coords: "-10,-10,-10,-10", hit: hitAll}, |
| 23 |
| 24 {desc: 'too few numbers', shape: 'circle', coords: "20,40", hit: hitNone}, |
| 25 {desc: 'negative radius', shape: 'circle', coords: "20,40,-10", hit: hitNone}, |
| 26 {desc: 'zero radius', shape: 'circle', coords: "20,40,0", hit: hitNone}, |
| 27 |
| 28 {desc: 'too few numbers', shape: 'poly', coords: "100,100,120,100,100", hit: h
itNone}, |
| 29 {desc: 'one too many numbers', shape: 'poly', coords: "100,100,120,100,100,120
,300", hit: hitPoly}, |
| 30 {desc: 'even-odd rule', shape: 'poly', coords: "100,100,200,100,100,200,150,50
,200,200", hit: hitStar}, |
| 31 ]; |
| 32 </script> |
OLD | NEW |