rem: test("attr(String, Object)x", function() { expect(2); stop(); $.get('data/dashboard.xml', function(xml) { var titles = []; $('tab', xml).each(function() { titles.push($(this).attr('title')); }); ok( titles[0] == 'Location', 'attr() in XML context: Check first title' ); ok( titles[1] == 'Users', 'attr() in XML context: Check second title' ); start(); }); }); 
add: test("attr(String, Object)", function() { expect(6); var div = $("div"); div.attr("foo", "bar"); var pass = true; for ( var i = 0; i < div.size(); i++ ) { if ( div.get(i).getAttribute('foo') != "bar" ) pass = false; } ok( pass, "Set Attribute" );  $("#name").attr('name', 'something'); ok( $("#name").attr('name') == 'something', 'Set name attribute' ); $("#check2").attr('checked', true); ok( document.getElementById('check2').checked == true, 'Set checked attribute' ); $("#check2").attr('checked', false); ok( document.getElementById('check2').checked == false, 'Set checked attribute' ); $("#text1").attr('readonly', true); ok( document.getElementById('text1').readOnly == true, 'Set readonly attribute' ); $("#text1").attr('readonly', false); ok( document.getElementById('text1').readOnly == false, 'Set readonly attribute' ); }); 
context: 	test("attr(String, Object)x", function() {		expect(2);		stop();		$.get('data/dashboard.xml', function(xml) { 	  	var titles = [];	  	$('tab', xml).each(function() {	    	titles.push($(this).attr('title'));	  	});	  	ok( titles[0] == 'Location', 'attr() in XML context: Check first title' );	  	ok( titles[1] == 'Users', 'attr() in XML context: Check second title' );	  	start();		});	});
meta: 5264	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5264/53e12752e00c2a86757ec15a0c871dee8ccd1bea/coreTest.js/buggy/src/jquery/coreTest.js