Changes between Version 9 and Version 10 of Writing Layout Tests for DumpRenderTree


Ignore:
Timestamp:
Mar 11, 2008 5:02:11 PM (16 years ago)
Author:
eric@webkit.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Layout Tests for DumpRenderTree

    v9 v10  
    1414 * Tests should not access the Internet. Avoid `http:` URLs in `src` and `href` attributes, in CSS properties and in XMLHttpRequest. Testing WebKit's network layer should be done using the HTTP test facility, to be described below.
    1515
    16  * Do not make unnecessary use of `window.setTimeout` and similar functions which create a lower bound on the time it takes the test to complete. For separating events in time, you can use `eventSender.leapForward`.
     16 * Do not make unnecessary use of `window.setTimeout` and similar functions which create a lower bound on the time it takes the test to complete. For separating events in time, you can use `eventSender.leapForward`; for waiting on sub-resources, you can use load events (e.g. iframe.onload = doNextStep;)
    1717
    18  * Do not make unnecessary use of external resources: use inline JavaScript and `style` elements instead of `link`s to external stylesheets. You can also use `data:` URLs sometimes for things like frames' `src` attribute. The exceptions are stylesheets and JavaScript libraries that are shared by multiple tests, and cases that test the loading of external resources.
     18 * Do not make unnecessary use of external resources: use inline JavaScript and `style` elements instead of `link`s to external stylesheets. You can also use `data:` URLs sometimes for things like frames' `src` attribute. The exceptions are stylesheets and JavaScript libraries that are shared by multiple tests, and cases that test the loading of external resources.  (There are various data: url generators on the net.)
     19
     20= Writing JavaScript-based DOM-only Test Cases =
     21Test 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 resources/ subdirectory
     23 * Add a TEMPLATE.html file to the same resources/ subdirectory, fixing the paths to point to fast/js/resources/js-test*
     24 * run make-js-test-wrappers
     25
     26To see what sort of special js functions are exposed to js-only tests, see fast/js/resources/js-test-pre.js
    1927
    2028= DumpRenderTree JavaScript Environment =
     
    5260Sends a mouseUp event to the WebView at the current mouse position.
    5361
     62=== `enableDOMUIEventLogging` ===
     63=== `fireKeyboardEventsToElement` ===
     64=== `setDragMode` ===
     65
    5466== `window.GCController` ==
    5567
     
    6779
    6880=== `insertText` ===
    69 
    7081=== `doCommand` ===
    71 
    7282=== `setMarkedText` ===
    73 
    7483=== `substringFromRange` ===
    75 
    7684=== `attributedSubstringFromRange` ===
    77 
    7885=== `firstRectForCharacterRange` ===
    79 
    8086=== `characterIndexForPoint` ===
    81 
    8287=== `makeAttributedString` ===
    8388