gecko/accessible/tests/mochitest/nsIAccessible_name.js

15 lines
320 B
JavaScript

function testName(aID, aName)
{
var acc = getAccessible(aID);
if (!acc) {
ok(false, "No accessible for " + aID + "!");
}
try {
is(acc.name, aName, "Wrong name of the accessible for " + aID);
} catch (e) {
ok(false, "Can't get name of the accessible for " + aID);
}
return acc;
}