accessible/tests/mochitest/tree/test_map.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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.

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <title>HTML map accessible tree tests</title>
     5   <link rel="stylesheet" type="text/css"
     6         href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     8   <script type="application/javascript"
     9           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    11   <script type="application/javascript"
    12           src="../common.js"></script>
    13   <script type="application/javascript"
    14           src="../role.js"></script>
    16   <script type="application/javascript">
    17     function doTest()
    18     {
    19       // map used as imagemap, not accessible
    20       var accTree =
    21         { SECTION: [ ] };
    23       testAccessibleTree("imagemapcontainer", accTree);
    25       // map group.  Imagemaps are inlines by default, so TEXT_CONTAINER.
    26       accTree =
    27         { TEXT_CONTAINER: [
    28           { PARAGRAPH: [
    29             { TEXT_LEAF: [ ] },
    30             { LINK: [
    31               { TEXT_LEAF: [ ] }
    32             ] },
    33             { TEXT_LEAF: [ ] },
    34             { LINK: [
    35               { TEXT_LEAF: [ ] }
    36             ] },
    37             { TEXT_LEAF: [ ] }
    38           ] }
    39         ] };
    41       testAccessibleTree("mapgroup", accTree);
    43       SimpleTest.finish();
    44     }
    46     SimpleTest.waitForExplicitFinish();
    47     addA11yLoadEvent(doTest);
    48   </script>
    49 </head>
    50 <body>
    52   <a target="_blank"
    53      title="Map used for grouping is not accessible under certain circumstances"
    54      href="https://bugzilla.mozilla.org/show_bug.cgi?id=627718">
    55     Mozilla Bug 627718
    56   </a>
    57   <p id="display"></p>
    58   <div id="content" style="display: none"></div>
    59   <pre id="test">
    60   </pre>
    62   <div id="imagemapcontainer">
    63     <map name="atoz_map">
    64       <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#b"
    65             coords="17,0,30,14" alt="b" shape="rect">
    66       <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#a"
    67             coords="0,0,13,14" alt="a" shape="rect">
    68     </map>
    69   </div>
    71   <img id="imgmap" width="447" height="15"
    72        usemap="#atoz_map"
    73        src="../letters.gif">
    75   <map id="mapgroup" title="Navigation Bar" name="mapgroup">
    76     <p>
    77       [<a href="#how">Bypass navigation bar</a>]
    78       [<a href="home.html">Home</a>]
    79     </p>
    80   </map>
    82 </body>
    83 </html>

mercurial