Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>Test usemap elements and ARIA</title> |
michael@0 | 5 | <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 6 | |
michael@0 | 7 | <script type="application/javascript" |
michael@0 | 8 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <script type="application/javascript" |
michael@0 | 10 | src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 11 | |
michael@0 | 12 | <script type="application/javascript" |
michael@0 | 13 | src="../common.js"></script> |
michael@0 | 14 | <script type="application/javascript" |
michael@0 | 15 | src="../role.js"></script> |
michael@0 | 16 | <script type="application/javascript" |
michael@0 | 17 | src="../events.js"></script> |
michael@0 | 18 | <script type="application/javascript" |
michael@0 | 19 | src="../states.js"></script> |
michael@0 | 20 | |
michael@0 | 21 | <script type="application/javascript"> |
michael@0 | 22 | //gA11yEventDumpToConsole = true; |
michael@0 | 23 | function doPreTest() |
michael@0 | 24 | { |
michael@0 | 25 | waitForImageMap("imagemap", doTest); |
michael@0 | 26 | } |
michael@0 | 27 | |
michael@0 | 28 | function doTest() |
michael@0 | 29 | { |
michael@0 | 30 | var imageMap = getAccessible("imagemap"); |
michael@0 | 31 | |
michael@0 | 32 | var t1 = imageMap.getChildAt(0); |
michael@0 | 33 | testStates(t1, 0, EXT_STATE_EDITABLE, STATE_LINKED); |
michael@0 | 34 | var t2 = imageMap.getChildAt(1); |
michael@0 | 35 | testStates(t2, 0, EXT_STATE_EDITABLE, STATE_LINKED); |
michael@0 | 36 | var rb1 = imageMap.getChildAt(2); |
michael@0 | 37 | testStates(rb1, (STATE_CHECKABLE | STATE_CHECKED), 0, STATE_LINKED); |
michael@0 | 38 | var rb2 = imageMap.getChildAt(3); |
michael@0 | 39 | testStates(rb2, STATE_CHECKABLE, 0, STATE_CHECKED, STATE_LINKED); |
michael@0 | 40 | var cb1 = imageMap.getChildAt(4); |
michael@0 | 41 | testStates(cb1, (STATE_CHECKABLE | STATE_CHECKED), 0, STATE_LINKED); |
michael@0 | 42 | var cbox = imageMap.getChildAt(5); |
michael@0 | 43 | testStates(cbox, (STATE_HASPOPUP | STATE_COLLAPSED), |
michael@0 | 44 | EXT_STATE_EXPANDABLE, STATE_LINKED); |
michael@0 | 45 | |
michael@0 | 46 | SimpleTest.finish(); |
michael@0 | 47 | } |
michael@0 | 48 | |
michael@0 | 49 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 50 | addA11yLoadEvent(doPreTest); |
michael@0 | 51 | </script> |
michael@0 | 52 | |
michael@0 | 53 | </head> |
michael@0 | 54 | <body> |
michael@0 | 55 | |
michael@0 | 56 | <a target="_blank" |
michael@0 | 57 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=548291" |
michael@0 | 58 | title="ARIA states on image maps"> |
michael@0 | 59 | Mozilla Bug 548291 |
michael@0 | 60 | </a> |
michael@0 | 61 | <p id="display"></p> |
michael@0 | 62 | <div id="content" style="display: none"></div> |
michael@0 | 63 | <pre id="test"> |
michael@0 | 64 | </pre> |
michael@0 | 65 | |
michael@0 | 66 | <img id="imagemap" src="../formimage.png" width="219" height="229" border="0" usemap="#ariaMap"> |
michael@0 | 67 | <map id="ariaMap" name="ariaMap"> |
michael@0 | 68 | <area id="t1" role="textbox" shape="rect" tabindex="0" alt="" title="first name" coords="4,20,108,48" href="#" /> |
michael@0 | 69 | <area id="t2" role="textbox" shape="rect" alt="" title="last name" coords="111,21,215,50" href="#" /> |
michael@0 | 70 | <area id="rb1" role="radio" aria-checked="true" shape="circle" alt="" title="male" coords="60,75,11" href="#" /> |
michael@0 | 71 | <area id="rb2" role="radio" shape="circle" alt="" title="female" coords="73,94,11" href="#" /> |
michael@0 | 72 | <area id="cb1" role="checkbox" aria-checked="true" shape="rect" alt="" title="have bike" coords="95,123,118,145" href="#" /> |
michael@0 | 73 | <area id="cbox" role="combobox" shape="rect" alt="" title="bike model" coords="120,124,184,146" href="#" /> |
michael@0 | 74 | <area id="cb2" role="checkbox" shape="rect" alt="" title="have car" coords="90,145,114,164" href="#" /> |
michael@0 | 75 | <area id="cb3" role="checkbox" shape="rect" alt="" title="have airplane" coords="130,163,152,184" href="#" /> |
michael@0 | 76 | <area id="b1" role="button" shape="rect" alt="" title="submit" coords="4,198,67,224" href="#" /> |
michael@0 | 77 | </map> |
michael@0 | 78 | </body> |
michael@0 | 79 | </html> |