accessible/tests/mochitest/states/test_controls.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 control states</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>
    15   <script type="application/javascript"
    16           src="../states.js"></script>
    18   <script type="application/javascript">
    19   function doTest()
    20   {
    21     // Undetermined progressbar (no value or aria-value attribute): mixed state
    22     testStates("progress", STATE_MIXED);
    23     // Determined progressbar (has value): shouldn't have mixed state
    24     testStates("progress2", 0, 0, STATE_MIXED);
    25     // Determined progressbar (has aria-value): shouldn't have mixed state
    26     // testStates("progress3", 0, 0, STATE_MIXED);
    27     todo(false, "we should respect ARIA");
    29     SimpleTest.finish();
    30   }
    32   SimpleTest.waitForExplicitFinish();
    33   addA11yLoadEvent(doTest);
    34   </script>
    35 </head>
    37 <body>
    38   <a target="_blank"
    39      href="https://bugzilla.mozilla.org/show_bug.cgi?id=670853"
    40      title="Bug 670853 - undetermined progressmeters should expose mixed state">
    41     Mozilla Bug 670853
    42   </a>
    43   <p id="display"></p>
    44   <div id="content" style="display: none"></div>
    45   <pre id="test">
    46   </pre>
    48   <progress id="progress"></progress>
    49   <progress id="progress2" value="1"></progress>
    50   <progress id="progress3" aria-valuenow="1"></progress>
    52 </body>
    53 </html>

mercurial