new Runner()
- Source:
Methods
(generator) run(testUrl, references, expected, timeout) → {Object}
Run a specific reftest.
The assumed semantics are those of web-platform-tests where references form a tree and each test must meet all the conditions to reach one leaf node of the tree in order for the overall test to pass.
Parameters:
Name | Type | Description |
---|---|---|
testUrl |
string | URL of the test itself. |
references |
Array.<Array> | Array representing a tree of references to try. Each item in the array represents a single reference node and has the form [referenceUrl, references, relation], where referenceUrl is a string to the url, relation is either "==" or "!=" depending on the type of reftest, and references is another array containing items of the same form, representing further comparisons treated as AND with the current item. Sibling entries are treated as OR. For example with testUrl of T: references = [[A, [[B, [], ==]], ==]] Must have T == A AND A == B to pass
|
expected |
string | Expected test outcome (e.g. PASS, FAIL). |
timeout |
number | Test timeout in ms |
- Source:
Returns:
Result object with fields status, message and extra.
- Type
- Object
(generator) setup(urlCount, screenshotMode)
Setup the required environment for running reftests.
This will open a non-browser window in which the tests will be loaded, and set up various caches for the reftest run.
Parameters:
Name | Type | Description |
---|---|---|
urlCount |
Object.<Number> | Object holding a map of URL: number of times the URL will be opened during the reftest run, where that's greater than 1. |
screenshotMode |
string | String enum representing when screenshots should be taken |
- Source: