Bug 569425. Use a synthesized mouse move to force image maps in these tests to setup because there is currently no non-hacky way to do that. r=dbaron

This commit is contained in:
Timothy Nikkel 2010-06-14 14:35:30 -05:00
parent 06f9a54961
commit dc601048fd
2 changed files with 22 additions and 0 deletions

View File

@ -8,6 +8,8 @@
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
@ -19,6 +21,15 @@
<script type="application/javascript">
function doTest()
{
//XXX We send a useless mouse move to the image to force it to setup its
// image map, because flushing layout won't do it. Hopefully bug 135040
// will make this not suck.
synthesizeMouse($("imagemap"), 10, 10, { type: "mousemove" });
//XXX This may affect a11y more than other code because imagemaps may not
// get drawn or have an mouse event over them. Bug 570322 tracks a11y
// dealing with this.
todo(false, "Need to remove this image map workaround.");
testStates("t1", 0, EXT_STATE_EDITABLE, STATE_LINKED);
testStates("t2", 0, EXT_STATE_EDITABLE, STATE_LINKED);
testStates("rb1", (STATE_CHECKABLE | STATE_CHECKED), 0, STATE_LINKED);

View File

@ -8,6 +8,8 @@
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
@ -19,6 +21,15 @@
<script type="application/javascript">
function doTest()
{
//XXX We send a useless mouse move to the image to force it to setup its
// image map, because flushing layout won't do it. Hopefully bug 135040
// will make this not suck.
synthesizeMouse($("imagemap"), 10, 10, { type: "mousemove" });
//XXX This may affect a11y more than other code because imagemaps may not
// get drawn or have an mouse event over them. Bug 570322 tracks a11y
// dealing with this.
todo(false, "Need to remove this image map workaround.");
var accTree = {
role: ROLE_IMAGE_MAP,
children: [