webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
RefEnv (TestFile f, TestSuite s, RefDrv d) | |
void | runTest () |
Object | createContext () |
Object | executeTestFile () |
boolean | parseResult () |
void | close () |
Static Public Attributes | |
static final String | tags [] |
static final String | sizeTag = "<#TEST CASES SIZE>" |
static final String | startTag = "<#TEST CASE" |
static final String | endTag = ">" |
RefEnv is used to run a JavaScript test in the JavaScript engine implemented in C. RefEnv creates a new ObservedTask and processes the standard output and standard error of the tests to determine the test result. The RefDrv expects the process output to contain the following content:
1 - anything (before the formatted output can be unstructured.
2 - the number of test cases output in the following way.
<TEST CASES SIZE> int
3 - the results of each test formatted in the following way (name, expected, actual, description, and reason can all be multilines)
<TEST CASE PASSED> true|false <TEST CASE NAME> text <TEST CASE EXPECTED> text <TEST CASE ACTUAL> text <TEST CASE DESCRIPTION> text <TEST CASE REASON> text <TEST CASE BUGNUMBER> text
4 - a marker that signifies the end of the tests
<TEST CASES DONE>
5 - after the end of the tests you can have more unstructed text.
The test case output is generated by the stopTest function, which is in the shared functions file, jsref.js.
Create a new RefEnv.
|
inline |
Method required by TestEnvironment; this implemenation does nothing.
Implements com.netscape.javascript.qa.drivers.TestEnvironment.
|
inline |
Instantiate a new JavaScript shell, passing the TestFile as an argument.
Implements com.netscape.javascript.qa.drivers.TestEnvironment.
|
inline |
Start the shell process.
Implements com.netscape.javascript.qa.drivers.TestEnvironment.
|
inline |
Parse the standard output of the process, and try to create new TestCase objects.
Implements com.netscape.javascript.qa.drivers.TestEnvironment.
|
inline |
Called by the driver to execute the test program.
Implements com.netscape.javascript.qa.drivers.TestEnvironment.
|
static |
end of a tag
|
static |
tag to specify the number of TestCases
beginning of a tag
|
static |
array of in output file to get attributes of a specific TestCase