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

mercurial