Changes between Version 2 and Version 3 of Writing DumpAsMarkup Tests


Ignore:
Timestamp:
Aug 3, 2010 2:34:53 PM (14 years ago)
Author:
rniwa@webkit.org
Comment:

Updated "Output Subtree" to match the recent changes

Legend:

Unmodified
Added
Removed
Modified
  • Writing DumpAsMarkup Tests

    v2 v3  
    4848== Output Subtree ==
    4949
    50 If you want to output a subtree of the DOM, call Markup.setNodeToDump(<node>) where <node> is a HTMLElement object for which you want to print the subtree. You can also specify the id of an element.
     50If you want to output a subtree of the DOM, call Markup.dump(<node>) where <node> is a HTMLElement object for which you want to print the subtree. You can also specify the id of an element.
    5151
    5252For example, if I have:
     
    5757<script>
    5858Markup.description('This is a dumpAsMarkup test.')
    59 Markup.setNodeToDump('test')
     59Markup.dump('test')
    6060</script>
    6161}}}
     
    6464{{{
    6565This is a dumpAsMarkup test.
    66 
    67 <DIV id="test">
    68 <A href="http://webkit.org/">
    69 <#text>WebKit</#text>
    70 </A>
    71 <#text> is </#text>
    72 <STRONG>
    73 <#text>awesome</#text>
    74 </STRONG>
    75 </DIV>
     66| <a>
     67|   href="http://webkit.org/"
     68|   "WebKit"
     69| " is "
     70| <strong>
     71|   "awesome"
    7672}}}
    7773
    78 Note "This is a dumpAsMarkup test." is added by Markup.description. The sentence will not be printed in DRT if we had it in a div like the earlier example because the entire document body is replaced by the output.
     74Note "This is a dumpAsMarkup test." is added by Markup.description. The sentence will not be printed on DRT if we had it in a div like the earlier example because the document body is replaced by the output.
    7975
    8076== Dump Multiple Times ==