Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / table-cell-for-column-and-row-crash.html
blobfe886be97d718887124648b16442cf3afda1a8ea
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
7 <body id="body">
8 <table id="testTable" summary="A summary to make sure this is always exposed as an AXTable">
9 <tr><td>foo</td></tr>
10 <tr><td>bar</td></tr>
11 </table>
13 <p id="description"></p>
14 <div id="console"></div>
15 <script>
16 description("This tests that retrieving a cell for a table multiple times doesn't crash.");
18 if (window.testRunner) {
19 testRunner.dumpAsText();
21 if (window.accessibilityController) {
22 document.getElementById("body").focus();
23 var axBody = accessibilityController.focusedElement;
25 var axTable = axBody.childAtIndex(0);
26 shouldBe("axTable.role", "'AXRole: AXTable'");
28 // Trying to reference the same cell for the table
29 // multiple times shouldn't result in a crash.
30 for (var i = 0; i < 10; i++) {
31 var axCell = axTable.cellForColumnAndRow(0, 0);
32 shouldBe("axCell.role", "'AXRole: AXCell'");
33 axCell = null;
35 // We need to force a call to the Garbage Collector here so we are
36 // sure that axCell will get actually destroyed after using it.
37 gc();
41 </script>
43 </body>
44 </html>