Skip to content

Commit

Permalink
Remove fix for #4484, add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
markelog committed Dec 28, 2012
1 parent f752891 commit f193acf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/manipulation.js
Expand Up @@ -11,7 +11,6 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>
wrapMap = { wrapMap = {
option: [ 1, "<select multiple='multiple'>" ], option: [ 1, "<select multiple='multiple'>" ],
legend: [ 1, "<fieldset>" ], legend: [ 1, "<fieldset>" ],
area: [ 1, "<map>" ],
param: [ 1, "<object>" ], param: [ 1, "<object>" ],
thead: [ 1, "<table>" ], thead: [ 1, "<table>" ],
tr: [ 2, "<table><tbody>" ], tr: [ 2, "<table><tbody>" ],
Expand Down
9 changes: 7 additions & 2 deletions test/unit/manipulation.js
Expand Up @@ -395,13 +395,13 @@ var testAppendForObject = function( valueObj, isFragment ) {


var testAppend = function( valueObj ) { var testAppend = function( valueObj ) {


expect( 59 ); expect( 61 );


testAppendForObject( valueObj, false ); testAppendForObject( valueObj, false );
testAppendForObject( valueObj, true ); testAppendForObject( valueObj, true );


var defaultText, result, message, iframe, iframeDoc, j, d, var defaultText, result, message, iframe, iframeDoc, j, d,
$input, $radioChecked, $radioUnchecked, $radioParent; $input, $radioChecked, $radioUnchecked, $radioParent, $map;


defaultText = "Try them out:"; defaultText = "Try them out:";
result = jQuery("#first").append( valueObj("<b>buga</b>") ); result = jQuery("#first").append( valueObj("<b>buga</b>") );
Expand Down Expand Up @@ -446,6 +446,11 @@ var testAppend = function( valueObj ) {
jQuery("<fieldset/>").appendTo("#form").append( valueObj("<legend id='legend'>test</legend>") ); jQuery("<fieldset/>").appendTo("#form").append( valueObj("<legend id='legend'>test</legend>") );
t( "Append legend", "#legend", [ "legend" ] ); t( "Append legend", "#legend", [ "legend" ] );


$map = jQuery("<map/>").append( valueObj("<area id='map01' shape='rect' coords='50,50,150,150' href='http://www.jquery.com/' alt='jQuery'>") );

equal( $map[ 0 ].childNodes.length, 1, "The area was inserted." );
equal( $map[ 0 ].firstChild.nodeName.toLowerCase(), "area", "The area was inserted." );

jQuery("#select1").append( valueObj("<OPTION>Test</OPTION>") ); jQuery("#select1").append( valueObj("<OPTION>Test</OPTION>") );
equal( jQuery("#select1 option:last").text(), "Test", "Appending OPTION (all caps)" ); equal( jQuery("#select1 option:last").text(), "Test", "Appending OPTION (all caps)" );


Expand Down

0 comments on commit f193acf

Please sign in to comment.