accessible/tests/mochitest/tree/test_aria_list.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.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <title>ARIA lists</title>
michael@0 5 <link rel="stylesheet" type="text/css"
michael@0 6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 7
michael@0 8 <script type="application/javascript"
michael@0 9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 10
michael@0 11 <script type="application/javascript"
michael@0 12 src="../common.js"></script>
michael@0 13 <script type="application/javascript"
michael@0 14 src="../role.js"></script>
michael@0 15
michael@0 16 <script type="application/javascript">
michael@0 17 function doTest()
michael@0 18 {
michael@0 19 //////////////////////////////////////////////////////////////////////////
michael@0 20 // list
michael@0 21
michael@0 22 var accTree =
michael@0 23 { LIST: [
michael@0 24 { LISTITEM: [
michael@0 25 { TEXT_LEAF: [ ] }
michael@0 26 ] }
michael@0 27 ] };
michael@0 28
michael@0 29 testAccessibleTree("list", accTree);
michael@0 30
michael@0 31 //////////////////////////////////////////////////////////////////////////
michael@0 32 // crazy list (mad mix of ARIA and HTML)
michael@0 33
michael@0 34 accTree = { // div@role="list"
michael@0 35 role: ROLE_LIST,
michael@0 36 children: [
michael@0 37 { // li text leaf
michael@0 38 role: ROLE_TEXT_LEAF,
michael@0 39 name: "item1",
michael@0 40 children: [ ]
michael@0 41 },
michael@0 42 { // li@role="listitem"
michael@0 43 role: ROLE_LISTITEM,
michael@0 44 children: [
michael@0 45 { // text leaf
michael@0 46 role: ROLE_TEXT_LEAF,
michael@0 47 name: "item2",
michael@0 48 children: [ ]
michael@0 49 }
michael@0 50 ]
michael@0 51 }
michael@0 52 ]
michael@0 53 };
michael@0 54
michael@0 55 testAccessibleTree("crazy_list", accTree);
michael@0 56
michael@0 57 SimpleTest.finish();
michael@0 58 }
michael@0 59
michael@0 60 SimpleTest.waitForExplicitFinish();
michael@0 61 addA11yLoadEvent(doTest);
michael@0 62 </script>
michael@0 63 </head>
michael@0 64 <body>
michael@0 65
michael@0 66 <a target="_blank"
michael@0 67 title="Build the context dependent tree"
michael@0 68 href="https://bugzilla.mozilla.org/show_bug.cgi?id=804461">
michael@0 69 Mozilla Bug 804461
michael@0 70 </a>
michael@0 71 <p id="display"></p>
michael@0 72 <div id="content" style="display: none"></div>
michael@0 73 <pre id="test">
michael@0 74 </pre>
michael@0 75
michael@0 76 <div id="list" role="list">
michael@0 77 <div role="listitem">item1</div>
michael@0 78 </div>
michael@0 79
michael@0 80 <div id="crazy_list" role="list">
michael@0 81 <ul role="presentation">
michael@0 82 <li>item1</li>
michael@0 83 <li role="listitem">item2</li>
michael@0 84 </ul>
michael@0 85 </div>
michael@0 86 </body>
michael@0 87 </html>

mercurial