Changes between Version 2 and Version 3 of AssociatingInformationWithTests
- Timestamp:
- Sep 5, 2015, 1:43:08 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AssociatingInformationWithTests
v2 v3 15 15 Keep in mind that “Failure” means “text failure.” If the test is a reference test, and you expect it to fail, use the keyword ImageOnlyFailure. 16 16 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>:17 2. 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>: 18 18 19 19 window.internals.setPagination(“LeftToRightPaginated", 0); … … 21 21 This 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(). 22 22 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 like23 3. 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 24 24 25 25 webkit-test-runner [ key=value otherkey=othervalue ]