equals(decodeURIComponent(jQuery.param({a:[1,2,3],'b[]':[4,5,6],'c[d]':[7,8,9],e:{f:[10],g:[11,12],h:13}})),"a[]=1&a[]=2&a[]=3&b[]=4&b[]=5&b[]=6&c[d][]=7&c[d][]=8&c[d][]=9&e[f][]=10&e[g][]=11&e[g][]=12&e[h]=13","Make sure params are not double-encoded.");
equals(decodeURIComponent(jQuery.param({a:[1,2,3],"b[]":[4,5,6],"c[d]":[7,8,9],e:{f:[10],g:[11,12],h:13}})),"a[]=1&a[]=2&a[]=3&b[]=4&b[]=5&b[]=6&c[d][]=7&c[d][]=8&c[d][]=9&e[f][]=10&e[g][]=11&e[g][]=12&e[h]=13","Make sure params are not double-encoded.");
// Make sure empty arrays and objects are handled #6481
equals(jQuery('#form').attr('style','position:absolute;').removeAttr('style').attr('style'),undefined,'Check removing style attribute on a form');
equals(jQuery('#fx-test-group').attr('height','3px').removeAttr('height').css('height'),"1px",'Removing height attribute has no effect on height set with style attribute');
equals(jQuery("#form").attr("style","position:absolute;").removeAttr("style").attr("style"),undefined,"Check removing style attribute on a form");
equals(jQuery("#fx-test-group").attr("height","3px").removeAttr("height").css("height"),"1px","Removing height attribute has no effect on height set with style attribute");
equals(jQuery(this).css("display"),jQuery.support.inlineBlockNeedsLayout?"inline":"inline-block","inline-block was set on non-floated inline element when animating width/height");
equals(this.offsetWidth,42,"width was animated");
equals(this.offsetHeight,42,"height was animated");
equals(result.text(),defaultText+'buga','Check if text appending works');
equals(jQuery('#select3').append(valueObj('<option value="appendTest">Append Test</option>')).find('option:last-child').attr('value'),'appendTest','Appending html options to select element');
equals(result.text(),defaultText+"buga","Check if text appending works");
equals(jQuery("#select3").append(valueObj("<option value='appendTest'>Append Test</option>")).find("option:last-child").attr("value"),"appendTest","Appending html options to select element");
QUnit.reset();
varexpected="This link has class=\"blog\": Simon Willison's WeblogTry them out:";
equals(jQuery("#first").text(),defaultText+'buga','Check if text appending works');
equals(jQuery('<option value="appendTest">Append Test</option>').appendTo('#select3').parent().find('option:last-child').attr('value'),'appendTest','Appending html options to select element');
vardefaultText="Try them out:"
jQuery("<b>buga</b>").appendTo("#first");
equals(jQuery("#first").text(),defaultText+"buga","Check if text appending works");
equals(jQuery("<option value='appendTest'>Append Test</option>").appendTo("#select3").parent().find("option:last-child").attr("value"),"appendTest","Appending html options to select element");
equals(result.text(),'buga'+defaultText,'Check if text prepending works');
equals(jQuery('#select3').prepend(val('<option value="prependTest">Prepend Test</option>')).find('option:first-child').attr('value'),'prependTest','Prepending html options to select element');
equals(result.text(),"buga"+defaultText,"Check if text prepending works");
equals(jQuery("#select3").prepend(val("<option value='prependTest'>Prepend Test</option>")).find("option:first-child").attr("value"),"prependTest","Prepending html options to select element");
QUnit.reset();
varexpected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
equals(jQuery('#first').text(),'buga'+defaultText,'Check if text prepending works');
equals(jQuery('<option value="prependTest">Prepend Test</option>').prependTo('#select3').parent().find('option:first-child').attr('value'),'prependTest','Prepending html options to select element');
vardefaultText="Try them out:"
jQuery("<b>buga</b>").prependTo("#first");
equals(jQuery("#first").text(),"buga"+defaultText,"Check if text prepending works");
equals(jQuery("<option value='prependTest'>Prepend Test</option>").prependTo("#select3").parent().find("option:first-child").attr("value"),"prependTest","Prepending html options to select element");
QUnit.reset();
varexpected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
@@ -1113,15 +1113,21 @@ var testHtml = function(valueObj) {
QUnit.reset();
jQuery("#main").html(valueObj('<script type="something/else">ok( false, "Non-script evaluated." );</script><script type="text/javascript">ok( true, "text/javascript is evaluated." );</script><script>ok( true, "No type is evaluated." );</script><div><script type="text/javascript">ok( true, "Inner text/javascript is evaluated." );</script><script>ok( true, "Inner No type is evaluated." );</script><script type="something/else">ok( false, "Non-script evaluated." );</script></div>'));
jQuery("#main").html(valueObj("<script type='something/else'>ok( false, 'Non-script evaluated.' );</script><script type='text/javascript'>ok( true, 'text/javascript is evaluated.' );</script><script>ok( true, 'No type is evaluated.' );</script><div><script type='text/javascript'>ok( true, 'Inner text/javascript is evaluated.' );</script><script>ok( true, 'Inner No type is evaluated.' );</script><script type='something/else'>ok( false, 'Non-script evaluated.' );</script></div>"));
varchild=jQuery("#main").find("script");
equals(child.length,2,"Make sure that two non-JavaScript script tags are left.");
equals(child[0].type,"something/else","Verify type of script tag.");
equals(child[1].type,"something/else","Verify type of script tag.");
jQuery("#main").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
jQuery("#main").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
jQuery("#main").html(valueObj("<script>ok( true, 'Test repeated injection of script.' );</script>"));
jQuery("#main").html(valueObj('<script type="text/javascript">ok( true, "jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (1)" );</script>'));
jQuery("#main").html(valueObj("<script type='text/javascript'>ok( true, 'jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (1)' );</script>"));
jQuery("#main").html(valueObj('foo <form><script type="text/javascript">ok( true, "jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (2)" );</script></form>'));
jQuery("#main").html(valueObj("foo <form><script type='text/javascript'>ok( true, 'jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (2)' );</script></form>"));
jQuery("#main").html(valueObj("<script>equals(jQuery.scriptorder++, 0, 'Script is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html (even though appears before)')<\/script><span id='scriptorder'><script>equals(jQuery.scriptorder++, 1, 'Script (nested) is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html')<\/script></span><script>equals(jQuery.scriptorder++, 2, 'Script (unnested) is executed in order');equals(jQuery('#scriptorder').length, 1,'Execute after html')<\/script>"));