[Dojo-checkins] dante - r17971 - dojo/trunk/tests/_base

dojo-checkins-admin at dojotoolkit.org dojo-checkins-admin at dojotoolkit.org
Tue Jun 16 12:32:14 EDT 2009


Author: dante
Date: Tue Jun 16 09:32:05 2009
New Revision: 17971

Modified:
   dojo/trunk/tests/_base/NodeList.html
Log:
refs #8612 - adding in a failing unit test that works before [17640]

Modified: dojo/trunk/tests/_base/NodeList.html
==============================================================================
--- dojo/trunk/tests/_base/NodeList.html	(original)
+++ dojo/trunk/tests/_base/NodeList.html	Tue Jun 16 09:32:05 2009
@@ -489,6 +489,28 @@
 							var divs = dojo.query("div").setTrue();
 							doh.t(passes);
 							doh.is(count, divs.length);
+						},
+						
+						function instantiate(t){
+
+							var test = 0;
+							dojo.declare("some.Thing", null, {
+								foo:"baz",
+								constructor: function(props, node){
+									dojo.mixin(this, props);
+									t.is("bar", this.foo, test++);
+								}
+							});
+							
+							dojo.query("#thinger").instantiate(some.Thing, {
+								foo:"bar"
+							});
+							
+							dojo.query("#thinger2").instantiate("some.Thing", {
+								foo:"bar"
+							});
+							
+							t.is(2, test);
 						}
 					]
 				);
@@ -504,6 +526,8 @@
 		<div id="t">
 			<span id="c1">c1</span>
 		</div>
+		<p id="thinger">Hi</p>
+		<p id="thinger2">Hi</p>
 	</body>
 </html>
 


More information about the Dojo-checkins mailing list