1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../resources/js-test.js"></script>
8 <table id=
"testTable" summary=
"A summary to make sure this is always exposed as an AXTable">
13 <p id=
"description"></p>
14 <div id=
"console"></div>
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'");
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.