From 0c97178553606c01b999441836e23f9f36c645a3 Mon Sep 17 00:00:00 2001 From: John Resig Date: Mon, 12 Jan 2009 14:00:35 +0000 Subject: Fixed an issue with parentNode being accessed in attr() on disconnected DOM elements. --- test/unit/core.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/unit') diff --git a/test/unit/core.js b/test/unit/core.js index 4d04af759..8483361a1 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -383,7 +383,7 @@ test("index(Object)", function() { }); test("attr(String)", function() { - expect(26); + expect(27); equals( jQuery('#text1').attr('value'), "Test", 'Check for value attribute' ); equals( jQuery('#text1').attr('value', "Test2").attr('defaultValue'), "Test", 'Check for defaultValue attribute' ); equals( jQuery('#text1').attr('type'), "text", 'Check for type attribute' ); @@ -407,6 +407,8 @@ test("attr(String)", function() { jQuery('').attr('href', '#5').appendTo('#main'); // using innerHTML in IE causes href attribute to be serialized to the full path equals( jQuery('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' ); + equals( jQuery("