| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script src="../resources/run-after-layout-and-paint.js"></script> |
| </head> |
| <body id="body"> |
| |
| <div id="content"> |
| |
| <table id="table" border=1> |
| <caption> TableCaption </caption> |
| <tr><td>foo</td><td>bar</td></tr> |
| </table> |
| |
| </div> |
| |
| <script> |
| |
| test_after_layout_and_paint((t) => { |
| var table = accessibilityController.accessibleElementById("table"); |
| assert_equals(table.childrenCount, 2); |
| window.captionText = table.childAtIndex(0).childAtIndex(0).name; |
| assert_equals(captionText, 'TableCaption'); |
| // Clear the HTML for cleaner results. |
| document.getElementById("content").innerHTML = ""; |
| } |
| ,"This tests that table caption element is exposed for accessibility."); |
| |
| </script> |
| |
| </body> |
| </html> |