[Dojo-checkins] bill - r17959 - dijit/trunk/tests/form/robot

dojo-checkins-admin at dojotoolkit.org dojo-checkins-admin at dojotoolkit.org
Sun Jun 14 22:10:04 EDT 2009


Author: bill
Date: Sun Jun 14 19:10:00 2009
New Revision: 17959

Modified:
   dijit/trunk/tests/form/robot/Button_a11y.html
Log:
Automated test for #4772, refs #4772 !strict.

Modified: dijit/trunk/tests/form/robot/Button_a11y.html
==============================================================================
--- dijit/trunk/tests/form/robot/Button_a11y.html	(original)
+++ dijit/trunk/tests/form/robot/Button_a11y.html	Sun Jun 14 19:10:00 2009
@@ -175,6 +175,37 @@
 							}), 1000);
 							return d;
 						}
+					},
+					{
+						name: "enter opens menu again",
+						timeout: 15000,
+						runTest: function(){
+							var d = new doh.Deferred();
+	
+							dijit.byId("edit").focus();
+							doh.robot.keyPress(dojo.keys.ENTER, 100, {});
+	
+							doh.robot.sequence(d.getTestCallback(function(){
+								doh.t(isVisible("editMenu"), "edit menu is visible: " + dijit.byId("editMenu").domNode.style.cssText);
+							}), 1000);
+							return d;
+						}
+					},
+					
+					{
+						name: "enter closes menu (#4772)",
+						timeout: 15000,
+						runTest: function(){
+							var d = new doh.Deferred();
+	
+							doh.robot.keyPress(dojo.keys.ENTER, 100, {});
+	
+							doh.robot.sequence(d.getTestCallback(function(){
+								doh.t(isHidden("editMenu"), "edit menu is hidden: " + dijit.byId("editMenu").domNode.style.cssText);
+								doh.is("edit", dojo.global.dijit._curFocus.id, "focus is back on button");
+							}), 1000);
+							return d;
+						}
 					}
 
 				]);


More information about the Dojo-checkins mailing list