test("contents()", function() { expect(12); equals( $("#ap").contents().length, 9, "Check element contents" ); ok( $("#iframe").contents()[0], "Check existance of IFrame document" ); var ibody = $("#loadediframe").contents()[0].body; ok( ibody, "Check existance of IFrame body" );  equals( $("span", ibody).text(), "span text", "Find span in IFrame and check its text" );  $(ibody).append("<div>init text</div>"); equals( $("div", ibody).length, 2, "Check the original div and the new div are in IFrame" );  equals( $("div:last", ibody).text(), "init text", "Add text to div in IFrame" );  $("div:last", ibody).text("div text"); equals( $("div:last", ibody).text(), "div text", "Add text to div in IFrame" );  $("div:last", ibody).remove(); equals( $("div", ibody).length, 1, "Delete the div and check only one div left in IFrame" );  equals( $("div", ibody).text(), "span text", "Make sure the correct div is still left after deletion in IFrame" );  $("<table/>", ibody).append("<tr><td>cell</td></tr>").appendTo(ibody); $("table", ibody).remove(); equals( $("div", ibody).length, 1, "Check for JS error on add and delete of a table in IFrame" );   var c = $("#nonnodes").contents().contents(); equals( c.length, 1, "Check node,textnode,comment contents is just one" ); equals( c[0].nodeValue, "hi", "Check node,textnode,comment contents is just the one from span" ); }); 
$("#ap > a").map(function(){ return this.parentNode; }), 
test("contents()", function() {	expect(12);	equals( $("#ap").contents().length, 9, "Check element contents" );	ok( $("#iframe").contents()[0], "Check existance of IFrame document" );	var ibody = $("#loadediframe").contents()[0].body;	ok( ibody, "Check existance of IFrame body" );	equals( $("span", ibody).text(), "span text", "Find span in IFrame and check its text" );	$(ibody).append("<div>init text</div>");	equals( $("div", ibody).length, 2, "Check the original div and the new div are in IFrame" );	equals( $("div:last", ibody).text(), "init text", "Add text to div in IFrame" );	$("div:last", ibody).text("div text");	equals( $("div:last", ibody).text(), "div text", "Add text to div in IFrame" );	$("div:last", ibody).remove();	equals( $("div", ibody).length, 1, "Delete the div and check only one div left in IFrame" );	equals( $("div", ibody).text(), "span text", "Make sure the correct div is still left after deletion in IFrame" );	$("<table/>", ibody).append("<tr><td>cell</td></tr>").appendTo(ibody);	$("table", ibody).remove();	equals( $("div", ibody).length, 1, "Check for JS error on add and delete of a table in IFrame" );	// using contents will get comments regular, text, and comment nodes	var c = $("#nonnodes").contents().contents();	equals( c.length, 1, "Check node,textnode,comment contents is just one" );	equals( c[0].nodeValue, "hi", "Check node,textnode,comment contents is just the one from span" );});
6056	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6056/279f77e9609fba62c11a06f8c65221b16f7bc7d4/core.js/clean/test/unit/core.js