test("html(String)", function() { expect(10); var div = $("#main > div"); div.html("<b>test</b>"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).childNodes.length != 1 ) pass = false; } ok( pass, "Set HTML" );  $("#main").html("<select/>"); $("#main select").html("<option>O1</option><option selected='selected'>O2</option><option>O3</option>"); equals( $("#main select").val(), "O2", "Selected option correct" );  stop();  $("#main").html('<script type="text/javascript">ok( true, "$().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );</script>');  $("#main").html('foo <form><script type="text/javascript">ok( true, "$().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );</script></form>');  $("#main").html("<script>ok(scriptorder++ == 0, 'Script is executed in order');ok($('#scriptorder').length == 0,'Execute before html')<\/script><span id='scriptorder'><script>ok(scriptorder++ == 1, 'Script is executed in order');ok($('#scriptorder').length == 1,'Execute after html')<\/script></span><script>ok(scriptorder++ == 2, 'Script is executed in order');ok($('#scriptorder').length == 1,'Execute after html')<\/script>");  setTimeout( start, 100 ); 
test("val(String)", function() { expect(3); document.getElementById('text1').value = "bla"; ok( $("#text1").val() == "bla", "Check for modified value of input element" ); $("#text1").val('test'); ok ( document.getElementById('text1').value == "test", "Check for modified (via val(String)) value of input element" );  $("#select1").val("3"); ok( $("#select1").val() == "3", "Check for modified (via val(String)) value of select element" ); 
test("html(String)", function() {	expect(10);	var div = $("#main > div");	div.html("<b>test</b>");	var pass = true;	for ( var i = 0; i < div.size(); i++ ) {		if ( div.get(i).childNodes.length != 1 ) pass = false;	}	ok( pass, "Set HTML" );	$("#main").html("<select/>");	$("#main select").html("<option>O1</option><option selected='selected'>O2</option><option>O3</option>");	equals( $("#main select").val(), "O2", "Selected option correct" );	stop();	$("#main").html('<script type="text/javascript">ok( true, "$().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );</script>');	$("#main").html('foo <form><script type="text/javascript">ok( true, "$().html().evalScripts() Evals Scripts Twice in Firefox, see #975" );</script></form>');	$("#main").html("<script>ok(scriptorder++ == 0, 'Script is executed in order');ok($('#scriptorder').length == 0,'Execute before html')<\/script><span id='scriptorder'><script>ok(scriptorder++ == 1, 'Script is executed in order');ok($('#scriptorder').length == 1,'Execute after html')<\/script></span><script>ok(scriptorder++ == 2, 'Script is executed in order');ok($('#scriptorder').length == 1,'Execute after html')<\/script>");	setTimeout( start, 100 );});
6056	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6056/0a755f6ab38d36ffda02f9ff5a6d606c24a94baa/core.js/clean/test/unit/core.js