\r
jQuery.extend({\r
cache: {},\r
+ \r
+ expando:expando,\r
\r
data: function( elem, name, data ) {\r
elem = elem == window ?\r
module("data");\r
\r
+test("expando", function(){\r
+ expect(4);\r
+ \r
+ equals("expando" in jQuery, true, "jQuery is exposing the expando");\r
+ \r
+ var obj = {};\r
+ jQuery.data(obj, "foo", "bar");\r
+\r
+ equals(jQuery.expando in obj, true, "jQuery.data added an expando to the object"); \r
+ \r
+ var id = obj[jQuery.expando];\r
+ equals( id in jQuery.cache, true, "jQuery.data added an entry to jQuery.cache");\r
+ \r
+ equals( jQuery.cache[id].foo, "bar", "jQuery.data worked correctly");\r
+});\r
+\r
test("jQuery.data", function() {\r
expect(5);\r
var div = jQuery("#foo")[0];\r