Changes between Version 2 and Version 3 of AssociatingInformationWithTests


Ignore:
Timestamp:
Sep 5, 2015 1:43:08 PM (4 years ago)
Author:
mmaxfield@apple.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AssociatingInformationWithTests

    v2 v3  
    1515Keep in mind that “Failure” means “text failure.” If the test is a reference test, and you expect it to fail, use the keyword ImageOnlyFailure.
    1616
    17 2. Another way to associate information is using a non-declarative mechanism: the JavaScript “window.internals” object. For example, if you want to say that your test should be paginated, you can say the following in a <script> tag in <head>:
     172. Another way to associate information is using a non-declarative mechanism: the JavaScript “window.internals” object. The is the preferred method of associating arbitrary semantics with a test. For example, if you want to say that your test should be paginated, you can say the following in a <script> tag in <head>:
    1818
    1919window.internals.setPagination(“LeftToRightPaginated", 0);
     
    2121This object is defined by the Internals.idl file in WebCore/testing, and is implemented by Internals.cpp. Note that these files are not compiled into WebCore itself, but instead have their own target called WebCoreTestSupport, which is depended on by our testing infrastructure (production builds don’t include it). In the Internals class, you have access to the current Document by calling contextDocument().
    2222
    23 3. A third way is useful for declaring information which must be available at web process launch. You can put text in the first line of the test which looks like
     233. A third way is useful for declaring information which must be available at web process launch (for example: private browsing mode). You can put text in the first line of the test which looks like
    2424
    2525webkit-test-runner [ key=value otherkey=othervalue ]