tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_img.html (2041B)


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