michael@0: /** michael@0: * Test accessible name for the given accessible identifier. michael@0: */ michael@0: function testName(aAccOrElmOrID, aName, aMsg) michael@0: { michael@0: var msg = aMsg ? aMsg : ""; michael@0: michael@0: var acc = getAccessible(aAccOrElmOrID); michael@0: if (!acc) michael@0: return; michael@0: michael@0: var txtID = prettyName(aAccOrElmOrID); michael@0: try { michael@0: is(acc.name, aName, msg + "Wrong name of the accessible for " + txtID); michael@0: } catch (e) { michael@0: ok(false, msg + "Can't get name of the accessible for " + txtID); michael@0: } michael@0: return acc; michael@0: } michael@0: michael@0: /** michael@0: * Test accessible description for the given accessible. michael@0: */ michael@0: function testDescr(aAccOrElmOrID, aDescr) michael@0: { michael@0: var acc = getAccessible(aAccOrElmOrID); michael@0: if (!acc) michael@0: return; michael@0: michael@0: is(acc.description, aDescr, michael@0: "Wrong description for " + prettyName(aAccOrElmOrID)); michael@0: }