mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
33 lines
714 B
JavaScript
33 lines
714 B
JavaScript
/**
|
|
* Test accessible name for the given accessible identifier.
|
|
*/
|
|
function testName(aAccOrElmOrID, aName, aMsg)
|
|
{
|
|
var msg = aMsg ? aMsg : "";
|
|
|
|
var acc = getAccessible(aAccOrElmOrID);
|
|
if (!acc)
|
|
return;
|
|
|
|
var txtID = prettyName(aAccOrElmOrID);
|
|
try {
|
|
is(acc.name, aName, msg + "Wrong name of the accessible for " + txtID);
|
|
} catch (e) {
|
|
ok(false, msg + "Can't get name of the accessible for " + txtID);
|
|
}
|
|
return acc;
|
|
}
|
|
|
|
/**
|
|
* Test accessible description for the given accessible.
|
|
*/
|
|
function testDescr(aAccOrElmOrID, aDescr)
|
|
{
|
|
var acc = getAccessible(aAccOrElmOrID);
|
|
if (!acc)
|
|
return;
|
|
|
|
is(acc.description, aDescr,
|
|
"Wrong description for " + prettyName(aAccOrElmOrID));
|
|
}
|