Test for a colon in attribute names for IE6/7. Fixes #1591.
This commit is contained in:
parent
e2bace8fa1
commit
24a8ffb3ea
2 changed files with 12 additions and 3 deletions
|
@ -77,7 +77,7 @@ test("prop(String, Object)", function() {
|
|||
});
|
||||
|
||||
test("attr(String)", function() {
|
||||
expect(35);
|
||||
expect(37);
|
||||
|
||||
equals( jQuery("#text1").attr("type"), "text", "Check for type attribute" );
|
||||
equals( jQuery("#radio1").attr("type"), "radio", "Check for type attribute" );
|
||||
|
@ -142,6 +142,10 @@ test("attr(String)", function() {
|
|||
equals( $button.attr("value"), "foobar", "Value retrieval on a button does not return innerHTML" );
|
||||
equals( $button.attr("value", "baz").html(), "text", "Setting the value does not change innerHTML" );
|
||||
|
||||
// Attributes with a colon on a table element (#1591)
|
||||
equals( jQuery("#table").attr("test:attrib"), undefined, "Retrieving a non-existent attribute on a table with a colon does not throw an error." );
|
||||
equals( jQuery("#table").attr("test:attrib", "foobar").attr("test:attrib"), "foobar", "Setting an attribute on a table with a colon does not throw an error." );
|
||||
|
||||
ok( jQuery("<div/>").attr("doesntexist") === undefined, "Make sure undefined is returned when no attribute is found." );
|
||||
ok( jQuery().attr("doesntexist") === undefined, "Make sure undefined is returned when no element is there." );
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue