accessible/tests/mochitest/tree/test_invalid_img.xhtml

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <html xmlns="http://www.w3.org/1999/xhtml">
michael@0 2 <head>
michael@0 3 <title>invalid html img</title>
michael@0 4
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>
michael@0 17 <![CDATA[
michael@0 18 function doTest()
michael@0 19 {
michael@0 20 document.getElementsByTagName("img")[0].firstChild.data = "2";
michael@0 21
michael@0 22 var accTree = {
michael@0 23 role: ROLE_TEXT_CONTAINER,
michael@0 24 children: [ { role: ROLE_TEXT_LEAF } ]
michael@0 25 };
michael@0 26 testAccessibleTree("the_img", accTree);
michael@0 27 SimpleTest.finish();
michael@0 28 }
michael@0 29
michael@0 30 SimpleTest.waitForExplicitFinish();
michael@0 31 addA11yLoadEvent(doTest);
michael@0 32 ]]>
michael@0 33 </script>
michael@0 34 </head>
michael@0 35 <body>
michael@0 36
michael@0 37 <a target="_blank"
michael@0 38 title="use HyperTextAccessible for invalid img"
michael@0 39 href="https://bugzilla.mozilla.org/show_bug.cgi?id=852129">
michael@0 40 Mozilla Bug 852129
michael@0 41 </a>
michael@0 42
michael@0 43 <p id="display"></p>
michael@0 44 <div id="content" style="display: none"></div>
michael@0 45 <pre id="test">
michael@0 46 </pre>
michael@0 47
michael@0 48 <img id="the_img">1</img>
michael@0 49 </body>
michael@0 50 </html>

mercurial