accessible/tests/mochitest/events/test_aria_objattr.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <html>
     3 <head>
     4   <title>Accessible ARIA object attribute changes</title>
     6   <link rel="stylesheet" type="text/css"
     7         href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     9   <script type="application/javascript"
    10           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    12   <script type="application/javascript"
    13           src="../common.js"></script>
    14   <script type="application/javascript"
    15           src="../events.js"></script>
    17   <script type="application/javascript">
    19     /**
    20      * Do tests.
    21      */
    22     var gQueue = null;
    24     function updateAttribute(aID, aAttr, aValue)
    25     {
    26       this.node = getNode(aID);
    27       this.accessible = getAccessible(this.node);
    29       this.eventSeq = [
    30         new invokerChecker(EVENT_OBJECT_ATTRIBUTE_CHANGED, this.accessible),
    31       ];
    33       this.invoke = function updateAttribute_invoke()
    34       {
    35         this.node.setAttribute(aAttr, aValue);
    36       }
    38       this.getID = function updateAttribute_getID()
    39       {
    40         return aAttr + " for " + aID + " " + aValue;
    41       }
    42     }
    44     // Debug stuff.
    45     // gA11yEventDumpID = "eventdump";
    46     //gA11yEventDumpToConsole = true;
    48     function doTests()
    49     {
    50       gQueue = new eventQueue();
    52       gQueue.push(new updateAttribute("hideable", "aria-hidden", "true"));
    54       gQueue.push(new updateAttribute("sortable", "aria-sort", "ascending"));
    56       // For experimental ARIA extensions
    57       gQueue.push(new updateAttribute("custom", "aria-blah", "true"));
    59       gQueue.invoke(); // Will call SimpleTest.finish();
    60     }
    62     SimpleTest.waitForExplicitFinish();
    63     addA11yLoadEvent(doTests);
    64   </script>
    65 </head>
    67 <body>
    69   <a target="_blank"
    70      href="https://bugzilla.mozilla.org/show_bug.cgi?id=581096"
    71      title="Add support for aria-hidden">
    72     Mozilla Bug 581096
    73   </a>
    75   <a target="_blank"
    76      href="https://bugzilla.mozilla.org/show_bug.cgi?id=640707"
    77      title="Add event support for aria-sort">
    78     Mozilla Bug 640707
    79   </a>
    81   <a target="_blank"
    82      href="https://bugzilla.mozilla.org/show_bug.cgi?id=640707"
    83      title="Expand support for aria attribute change events">
    84     Mozilla Bug 563862
    85   </a>
    87   <p id="display"></p>
    88   <div id="content" style="display: none"></div>
    89   <pre id="test">
    90   </pre>
    91   <div id="eventdump"></div>
    93   <div id="hideable"><div>Hi</div><div>there</div></div>
    95   <div id="sortable" role="columnheader" aria-sort="none">aria-sort</div>
    97   <div id="custom" role="custom" aria-blah="false">Fat free cheese</div>
    98 </body>
    99 </html>

mercurial