bug 441974 - protect against failure in call to accessible.numActions

This commit is contained in:
Marco Zehe 2008-09-22 14:39:13 +02:00
parent 53d7535587
commit 39721a6d07

View File

@ -94,7 +94,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=420863
gNode.removeEventListener("click", gClickHandler, false);
// check actions
is(gAcc.numActions, 0, gID + ": shouldn't have actions");
// XXX see bug 456347, sometimes after removing the event listener, the
// accessible is no longer valid. When fixing that bug, remove the
// try/exception and simply test for the gAcc.numActions value directly.
var numActions = -1;
try {
numActions = gAcc.numActions;
} catch(e) {}
if (numActions == -1)
todo(false,
"gAcc.numActions should not throw after click handler was removed!");
else
is(numActions, 0, gID + ": shouldn't have actions");
SimpleTest.finish();
}