Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>HTML img tests</title> |
michael@0 | 5 | <link rel="stylesheet" type="text/css" |
michael@0 | 6 | href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript" |
michael@0 | 9 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | <script type="application/javascript" |
michael@0 | 11 | src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 12 | |
michael@0 | 13 | <script type="application/javascript" |
michael@0 | 14 | src="../common.js"></script> |
michael@0 | 15 | <script type="application/javascript" |
michael@0 | 16 | src="../role.js"></script> |
michael@0 | 17 | <script type="application/javascript" |
michael@0 | 18 | src="../events.js"></script> |
michael@0 | 19 | |
michael@0 | 20 | <script type="application/javascript"> |
michael@0 | 21 | //gA11yEventDumpToConsole = true; |
michael@0 | 22 | function doPreTest() |
michael@0 | 23 | { |
michael@0 | 24 | waitForImageMap("imgmap", doTest); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | function doTest() |
michael@0 | 28 | { |
michael@0 | 29 | // image map |
michael@0 | 30 | var accTree = { |
michael@0 | 31 | role: ROLE_IMAGE_MAP, |
michael@0 | 32 | children: [ |
michael@0 | 33 | { |
michael@0 | 34 | role: ROLE_LINK, |
michael@0 | 35 | children: [] |
michael@0 | 36 | }, |
michael@0 | 37 | { |
michael@0 | 38 | role: ROLE_LINK, |
michael@0 | 39 | children: [] |
michael@0 | 40 | } |
michael@0 | 41 | ] |
michael@0 | 42 | }; |
michael@0 | 43 | |
michael@0 | 44 | testAccessibleTree("imgmap", accTree); |
michael@0 | 45 | |
michael@0 | 46 | // img |
michael@0 | 47 | accTree = { |
michael@0 | 48 | role: ROLE_GRAPHIC, |
michael@0 | 49 | children: [] |
michael@0 | 50 | }; |
michael@0 | 51 | |
michael@0 | 52 | testAccessibleTree("img", accTree); |
michael@0 | 53 | |
michael@0 | 54 | SimpleTest.finish(); |
michael@0 | 55 | } |
michael@0 | 56 | |
michael@0 | 57 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 58 | addA11yLoadEvent(doPreTest); |
michael@0 | 59 | </script> |
michael@0 | 60 | |
michael@0 | 61 | </head> |
michael@0 | 62 | <body> |
michael@0 | 63 | |
michael@0 | 64 | <a target="_blank" |
michael@0 | 65 | title="Fix O(n^2) access to all the children of a container" |
michael@0 | 66 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=342045"> |
michael@0 | 67 | Mozilla Bug 342045 |
michael@0 | 68 | </a> |
michael@0 | 69 | <p id="display"></p> |
michael@0 | 70 | <div id="content" style="display: none"></div> |
michael@0 | 71 | <pre id="test"> |
michael@0 | 72 | </pre> |
michael@0 | 73 | |
michael@0 | 74 | <map name="atoz_map"> |
michael@0 | 75 | <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#b" |
michael@0 | 76 | coords="17,0,30,14" alt="b" shape="rect"> |
michael@0 | 77 | <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#a" |
michael@0 | 78 | coords="0,0,13,14" alt="a" shape="rect"> |
michael@0 | 79 | </map> |
michael@0 | 80 | |
michael@0 | 81 | <img id="imgmap" width="447" height="15" |
michael@0 | 82 | usemap="#atoz_map" |
michael@0 | 83 | src="../letters.gif"> |
michael@0 | 84 | |
michael@0 | 85 | <img id="img" src="../moz.png"> |
michael@0 | 86 | |
michael@0 | 87 | </body> |
michael@0 | 88 | </html> |