X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=11cb5fb1961bfca5903cfca8b2a765dfed9dafa1;hb=a69aad2242a5be4ee21955d6132247b4781d410e;hp=6b73b0cf70d3847aa0a5307561a21b4ffed2f6f3;hpb=d4849a0d3589ea3d369137f79b102eb68403b489;p=jquery.git diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 6b73b0c..11cb5fb 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -74,7 +74,7 @@ test("index(Object)", function() { }); test("attr(String)", function() { - expect(12); + expect(15); ok( $('#text1').attr('value') == "Test", 'Check for value attribute' ); ok( $('#text1').attr('type') == "text", 'Check for type attribute' ); ok( $('#radio1').attr('type') == "radio", 'Check for type attribute' ); @@ -87,6 +87,13 @@ test("attr(String)", function() { ok( $('#name').attr('name') == "name", 'Check for name attribute' ); ok( $('#text1').attr('name') == "action", 'Check for name attribute' ); ok( $('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' ); + equals( "#2", $('#anchor2').attr('href'), 'Check for non-absolute href (an anchor)' ); + stop(); + $.get("data/dashboard.xml", function(xml) { + ok( $("locations", xml).attr("class") == "foo", "Check class attribute in XML document" ); + ok( $("location", xml).attr("for") == "bar", "Check for attribute in XML document" ); + start(); + }); }); test("attr(String, Function)", function() {