* Fixed IE ID selectors selecting by the name attribute and added tests
[jquery.git] / src / jquery / coreTest.js
index 497d30d..25cb69b 100644 (file)
@@ -74,7 +74,7 @@ test("index(Object)", function() {
 });\r
 \r
 test("attr(String)", function() {\r
-       expect(14);\r
+       expect(15);\r
        ok( $('#text1').attr('value') == "Test", 'Check for value attribute' );\r
        ok( $('#text1').attr('type') == "text", 'Check for type attribute' );\r
        ok( $('#radio1').attr('type') == "radio", 'Check for type attribute' );\r
@@ -87,7 +87,10 @@ test("attr(String)", function() {
        ok( $('#name').attr('name') == "name", 'Check for name attribute' );\r
        ok( $('#text1').attr('name') == "action", 'Check for name attribute' );\r
        ok( $('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );\r
-       //equals( "#2", $('#anchor2').attr('href'), 'Check for non-absolute href (an anchor)' ); This fails in IE because the _config.fixture is reloaded using innerHTML\r
+       \r
+       $('<a id="tAnchor5"></a>').attr('href', '#5').appendTo('#main'); // using innerHTML in IE causes href attribute to be serialized to the full path\r
+       ok( $('#tAnchor5').attr('href') == "#5", 'Check for non-absolute href (an anchor)' );\r
+       \r
        stop();\r
        $.get("data/dashboard.xml", function(xml) {\r
                ok( $("locations", xml).attr("class") == "foo", "Check class attribute in XML document" );\r
@@ -242,7 +245,7 @@ test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {
        \r
        reset();\r
        $("#sap").append(document.getElementById('form'));\r
-       ok( $("#sap>form").size() == 1, "Check for appending a form" );\r
+       ok( $("#sap>form").size() == 1, "Check for appending a form" );  // Bug #910\r
        \r
 });\r
 \r