Changes between Version 18 and Version 19 of Writing Layout Tests for DumpRenderTree


Ignore:
Timestamp:
Mar 30, 2011 5:00:53 PM (10 years ago)
Author:
arv@chromium.org
Comment:

Change the section about "Writing JavaScript-based DOM-only Test Cases" to encourage a single file. AP asked me to make this change.

Legend:

Unmodified
Added
Removed
Modified
  • Writing Layout Tests for DumpRenderTree

    v18 v19  
    1919
    2020= Writing JavaScript-based DOM-only Test Cases =
    21 Test cases which only test the DOM can be written as .js files instead of .html files.
    22  * Write a .js file and place it in a `script-tests/` subdirectory.
    23  * Add a `TEMPLATE.html` file to the same `script-tests/` subdirectory, fixing the paths to point to `fast/js/resources/js-test*`.
    24  * Run `make-script-test-wrappers`. An example:
    25 {{{
    26 $ make-script-test-wrappers LayoutTests/fast/dom/script-tests/my-new-test.js
    27 }}}
     21
     22When writing test cases that only test the DOM it is still preferred to use an .html file since it only requires one test file instead of two.
     23
     24When writing these tests it is often useful to include [http://trac.webkit.org/browser/trunk/LayoutTests/fast/js/resources/js-test-pre.js LayoutTests/fast/js/resources/js-test-pre.js] and  [http://trac.webkit.org/browser/trunk/LayoutTests/fast/js/resources/js-test-post.js LayoutTests/fast/js/resources/js-test-post.js]. To get these to work you need to have an element with id `description` and another element with the id `console`.
    2825
    2926To see what sort of special js functions are exposed to js-only tests, see [http://trac.webkit.org/browser/trunk/LayoutTests/fast/js/resources/js-test-pre.js LayoutTests/fast/js/resources/js-test-pre.js]