[webkit-changes] cvs commit: WebCore/layout-tests/fast/forms
access-key-expected.txt access-key.html
Geoffrey
ggaren at opensource.apple.com
Wed Jun 29 10:52:17 PDT 2005
ggaren 05/06/29 10:52:16
Modified: . ChangeLog
Added: layout-tests/fast/forms access-key-expected.txt
access-key.html
Log:
Patch by Joost de Valk <webkit at joostdevalk.nl>
- http://bugzilla.opendarwin.org/show_bug.cgi?id=3732
Testcase for accesskeys that will run with run-webkit-tests.
Reviewed by Darin.
Test cases added:
* layout-tests/fast/forms/access-key-expected.txt: Added.
* layout-tests/fast/forms/access-key.html: Added.
Revision Changes Path
1.4328 +13 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4327
retrieving revision 1.4328
diff -u -r1.4327 -r1.4328
--- ChangeLog 29 Jun 2005 17:50:17 -0000 1.4327
+++ ChangeLog 29 Jun 2005 17:52:13 -0000 1.4328
@@ -1,3 +1,16 @@
+2005-06-29 Geoffrey Garen <ggaren at apple.com>
+
+ Patch by Joost de Valk <webkit at joostdevalk.nl>
+
+ - http://bugzilla.opendarwin.org/show_bug.cgi?id=3732
+ Testcase for accesskeys that will run with run-webkit-tests.
+
+ Reviewed by Darin.
+
+ Test cases added:
+ * layout-tests/fast/forms/access-key-expected.txt: Added.
+ * layout-tests/fast/forms/access-key.html: Added.
+
2005-06-29 Justin Garcia <justin.garcia at apple.com>
Patch by Anders Carlsson <andersca at mac.com>
1.1 WebCore/layout-tests/fast/forms/access-key-expected.txt
Index: access-key-expected.txt
===================================================================
This test checks to see if accesskey attributes works on the specified elements.
If this test passes you should see 1 - 9 and a, b and c clicked or focussed.
1 button clicked
2 input type button focussed
3 input type checkbox focussed
4 input type text focussed
5 input type submit clicked
6 input type reset clicked
7 link clicked
8 input type associated to legend focussed
9 input type associated to label around input focussed
a input type associated to label closed before input focussed
b area 1 clicked
c area 2 clicked
1.1 WebCore/layout-tests/fast/forms/access-key.html
Index: access-key.html
===================================================================
<html>
<head>
<script>
function log(message)
{
var item = document.createElement("li");
item.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(item);
}
function pressKey(key)
{
var event = document.createEvent("KeyboardEvent");
event.initKeyboardEvent("keydown", true, true, document.defaultView, key, 0, true, false, false, false, false);
document.dispatchEvent(event);
}
function test()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
for(i = 1; i <= 9; i++) {
pressKey(i);
}
pressKey("a");
pressKey("b");
pressKey("c");
pressKey("d");
}
</script>
</head>
<body onload="test()">
<p>This test checks to see if accesskey attributes works on the specified elements.</p>
<p>If this test passes you should see 1 - 9 and a, b and c clicked or focussed.</p>
<hr>
<p>
<button accesskey="1" onclick="log('1 button clicked')"></button>
<input type="button" value="Click me!" accesskey="2" onfocus="log('2 input type button focussed')"/>
<input type="checkbox" accesskey="3" onfocus="log('3 input type checkbox focussed')"/>
<input type="text" accesskey="4" onfocus="log('4 input type text focussed')"/>
<input type="submit" accesskey="5" onfocus="log('5 input type submit clicked')"/>
<input type="reset" accesskey="6" onfocus="log('6 input type reset clicked')"/>
<a href="#" accesskey="7" onclick="log('7 link clicked')"></a>
<fieldset><legend accesskey="8"></legend><input type="text" onfocus="log('8 input type associated to legend focussed')"/></fieldset>
<label accesskey="9" for="test1"><input type="text" id="test1" onfocus="log('9 input type associated to label around input focussed')"/></label>
<label accesskey="a" for="test2"></label><input type="text" id="test2" onfocus="log('a input type associated to label closed before input focussed')"/>
<map name="mymap">
<area accesskey="b" shape="rect" coords="0,0,5,10" alt="" href="#" onclick="log('b area 1 clicked')">
<area accesskey="c" shape="rect" coords="6,0,10,10" alt="" href="#" onclick="log('c area 2 clicked')">
</map>
<img usemap="#mymap" alt="pic" src="#" height="10" width="10"/>
</p>
<hr>
<ol id="console"></ol>
</body>
</html>
More information about the webkit-changes
mailing list