mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
6a04618807
--HG-- rename : accessible/tests/mochitest/test_aria_activedescendant.html => accessible/tests/mochitest/events/test_focus_aria_activedescendant.html rename : accessible/tests/mochitest/events/test_focus.html => accessible/tests/mochitest/events/test_focus_dialog.html rename : accessible/tests/mochitest/events/test_focusdoc.html => accessible/tests/mochitest/events/test_focus_doc.html rename : accessible/tests/mochitest/events/test_focus.xul => accessible/tests/mochitest/events/test_focus_general.xul rename : accessible/tests/mochitest/states/test_comboboxes.xul => accessible/tests/mochitest/states/test_expandable.xul rename : accessible/tests/mochitest/test_nsIAccessible_selects.html => accessible/tests/mochitest/states/test_selects.html
91 lines
2.4 KiB
HTML
91 lines
2.4 KiB
HTML
<html>
|
|
|
|
<head>
|
|
<title>Event object attributes tests</title>
|
|
|
|
<link rel="stylesheet" type="text/css"
|
|
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
|
|
|
<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="../common.js"></script>
|
|
<script type="application/javascript"
|
|
src="../events.js"></script>
|
|
<script type="application/javascript"
|
|
src="../attributes.js"></script>
|
|
|
|
<script type="application/javascript">
|
|
|
|
/**
|
|
* Test "event-from-input" object attribute.
|
|
*/
|
|
function eventFromInputChecker(aEventType, aID, aValue, aNoTargetID)
|
|
{
|
|
this.type = aEventType;
|
|
this.target = getAccessible(aID);
|
|
|
|
this.noTarget = getNode(aNoTargetID);
|
|
|
|
this.check = function checker_check(aEvent)
|
|
{
|
|
testAttrs(aEvent.accessible, { "event-from-input": aValue }, true);
|
|
|
|
var accessible = getAccessible(this.noTarget);
|
|
testAbsentAttrs(accessible, { "event-from-input": "" });
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Do tests.
|
|
*/
|
|
var gQueue = null;
|
|
|
|
// gA11yEventDumpID = "eventdump"; // debug stuff
|
|
//gA11yEventDumpToConsole = true; // debug stuff
|
|
|
|
function doTests()
|
|
{
|
|
gQueue = new eventQueue();
|
|
|
|
var id = "textbox", noTargetId = "textarea";
|
|
var checker =
|
|
new eventFromInputChecker(EVENT_FOCUS, id, "false", noTargetId);
|
|
gQueue.push(new synthFocus(id, checker));
|
|
|
|
if (!MAC) { // Mac failure is bug 541093
|
|
var checker =
|
|
new eventFromInputChecker(EVENT_TEXT_CARET_MOVED, id, "false", noTargetId);
|
|
gQueue.push(new synthHomeKey(id, checker));
|
|
}
|
|
|
|
gQueue.invoke(); // Will call SimpleTest.finish();
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
addA11yLoadEvent(doTests);
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<a target="_blank"
|
|
href="https://bugzilla.mozilla.org/show_bug.cgi?id=540285"
|
|
title="Event object attributes testing">
|
|
Mozilla Bug 540285
|
|
</a>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none"></div>
|
|
<pre id="test">
|
|
</pre>
|
|
|
|
<input id="textbox" value="hello">
|
|
<textarea id="textarea"></textarea>
|
|
|
|
<div id="eventdump"></div>
|
|
</body>
|
|
</html>
|