X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=f24a10b3bdc32017384847d5485960c3623e69c3;hb=495ecb70b2b097e7d4a1ffe46d44562210cdc051;hp=0bb972756b28ab14b4ce04c2e4f45f3cc225463d;hpb=a82b048db8c72dccb019e086e0ca50617df14915;p=jquery.git diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 0bb9727..f24a10b 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -14,6 +14,9 @@ test("Basic requirements", function() { test("$()", function() { var main = $("#main"); isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" ); + + // make sure this is handled + $('

\r\n

'); }); test("length", function() { @@ -71,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' ); @@ -84,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' ); + ok( $('#anchor2').attr('href') == "#2", '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() {