B2G/gecko/parser/htmlparser/tests/mochitest/parser_datreader.js
/**
 * Transforms the descendants of an element to a string matching the format
 * in the test cases.
 *
 * @param an element
 */
Transforms the descendants of an element to a string matching the format
in the test cases.

@param an element
Transforms the descendants of an element to a string matching the format in the test cases . @param an element
function fragmentToTestOutput(elt) {
  var walker = elt.ownerDocument.createTreeWalker(elt, NodeFilter.SHOW_ALL, 
    function (node) { return elt == node ? 
                        NodeFilter.FILTER_SKIP : 
                        NodeFilter.FILTER_ACCEPT; }, true);
  return addLevels(walker, "", "| ").slice(0,-1); 
}
function fragmentToTestOutput ( elt ) { var walker = elt . ownerDocument . createTreeWalker ( elt , NodeFilter . SHOW_ALL , function ( node ) { return elt == node ? NodeFilter . FILTER_SKIP : NodeFilter . FILTER_ACCEPT ; } , true ) ; return addLevels ( walker , "" , "| " ) . slice ( 0 , - 1 ) ; }
Transforms the descendants of an element to a string matching the format
 in the test cases.
Transforms the descendants of an element to a string matching the format in the test cases .
// remove the last newline