mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
d56619b51b
--HG-- rename : accessible/tests/mochitest/name.css => accessible/tests/mochitest/name/general.css rename : accessible/tests/mochitest/name.xbl => accessible/tests/mochitest/name/general.xbl rename : accessible/tests/mochitest/name.js => accessible/tests/mochitest/name/markup.js rename : accessible/tests/mochitest/namerules.xml => accessible/tests/mochitest/name/markuprules.xml rename : accessible/tests/mochitest/name_nsRootAcc_wnd.xul => accessible/tests/mochitest/name/nsRootAcc_wnd.xul rename : accessible/tests/mochitest/test_name_button.html => accessible/tests/mochitest/name/test_button.html rename : accessible/tests/mochitest/test_name.html => accessible/tests/mochitest/name/test_general.html rename : accessible/tests/mochitest/test_name.xul => accessible/tests/mochitest/name/test_general.xul rename : accessible/tests/mochitest/test_name_link.html => accessible/tests/mochitest/name/test_link.html rename : accessible/tests/mochitest/test_name_markup.html => accessible/tests/mochitest/name/test_markup.html rename : accessible/tests/mochitest/test_name_nsRootAcc.xul => accessible/tests/mochitest/name/test_nsRootAcc.xul
20 lines
446 B
JavaScript
20 lines
446 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;
|
|
}
|