2009-03-09 08:10:40 -07:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
2010-02-03 07:00:25 -08:00
|
|
|
<title>nsIAccessible actions testing on HTML links (HTML:a)</title>
|
2009-03-09 08:10:40 -07:00
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css"
|
|
|
|
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
|
|
|
|
|
|
|
<script type="application/javascript"
|
|
|
|
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/a11y/accessible/common.js"></script>
|
|
|
|
<script type="application/javascript"
|
2009-05-10 18:32:09 -07:00
|
|
|
src="chrome://mochikit/content/a11y/accessible/events.js"></script>
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/a11y/accessible/actions.js"></script>
|
2009-03-09 08:10:40 -07:00
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
function doTest()
|
|
|
|
{
|
|
|
|
var actionsArray = [
|
|
|
|
{
|
2010-02-03 07:00:25 -08:00
|
|
|
ID: "link1",
|
|
|
|
actionName: "jump",
|
2009-03-09 08:10:40 -07:00
|
|
|
events: CLICK_EVENTS
|
|
|
|
},
|
|
|
|
{
|
2010-02-03 07:00:25 -08:00
|
|
|
ID: "img1",
|
|
|
|
actionName: "click",
|
2009-03-09 08:10:40 -07:00
|
|
|
events: CLICK_EVENTS
|
|
|
|
},
|
|
|
|
{
|
2010-02-03 07:00:25 -08:00
|
|
|
ID: "link2",
|
|
|
|
actionName: "click",
|
2009-03-09 08:10:40 -07:00
|
|
|
events: CLICK_EVENTS
|
|
|
|
},
|
|
|
|
{
|
2010-02-03 07:00:25 -08:00
|
|
|
ID: "img2",
|
|
|
|
actionName: "click",
|
2009-03-09 08:10:40 -07:00
|
|
|
events: CLICK_EVENTS
|
|
|
|
},
|
|
|
|
{
|
2010-02-03 07:00:25 -08:00
|
|
|
ID: "link3",
|
|
|
|
actionName: "click",
|
|
|
|
events: CLICK_EVENTS
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ID: "img3",
|
|
|
|
actionName: "click",
|
|
|
|
events: CLICK_EVENTS
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ID: "link4",
|
|
|
|
actionName: "click",
|
|
|
|
events: CLICK_EVENTS
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ID: "img4",
|
|
|
|
actionName: "click",
|
2009-03-09 08:10:40 -07:00
|
|
|
events: CLICK_EVENTS
|
|
|
|
}
|
|
|
|
];
|
|
|
|
testActions(actionsArray);
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2009-09-23 07:21:47 -07:00
|
|
|
addA11yLoadEvent(doTest);
|
2009-03-09 08:10:40 -07:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<a target="_blank"
|
2010-02-03 07:00:25 -08:00
|
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409"
|
|
|
|
title="Expose click action if mouseup and mousedown are registered">
|
|
|
|
Mozilla Bug 423409
|
2009-03-09 08:10:40 -07:00
|
|
|
</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
|
2010-02-03 07:00:25 -08:00
|
|
|
<a href="http://mozilla.org" id="link1">
|
|
|
|
<img src="chrome://mochikit/content/a11y/accessible/moz.png" id="img1">
|
|
|
|
</a>
|
|
|
|
<a id="link2" onmousedown="">
|
|
|
|
<img src="chrome://mochikit/content/a11y/accessible/moz.png" id="img2">
|
|
|
|
</a>
|
|
|
|
<a id="link3" onclick="">
|
|
|
|
<img src="chrome://mochikit/content/a11y/accessible/moz.png" id="img3">
|
|
|
|
</a>
|
|
|
|
<a id="link4" onmouseup="">
|
|
|
|
<img src="chrome://mochikit/content/a11y/accessible/moz.png" id="img4">
|
|
|
|
</a>
|
2009-03-09 08:10:40 -07:00
|
|
|
</body>
|
|
|
|
</html>
|