* is defined in all tests. Parse the testcases array, and create a new
* TestCase object for each TestCase object it finds.
*/
public synchronized boolean parseResult() {
try {
JSObject testcases = (JSObject) window.getMember("testcases");
file.totalCases = ((Number) ((JSObject) testcases).getMember("length")).intValue();
System.out.println( "testcases.length is " + file.totalCases );
for ( int i = 0; i < file.totalCases; i++ ) {
JSObject tc = (JSObject) ((JSObject) testcases).getSlot(i);
TestCase nc = new TestCase(
tc.getMember("passed") == null ? "null" : tc.getMember("passed").toString(),
tc.getMember("name") == null ? "null " : tc.getMember("name").toString(),
tc.getMember("description") == null ? "null " : tc.getMember("description").toString(),
tc.getMember("expect") == null ? "null " : tc.getMember("expect").toString(),
tc.getMember("actual") == null ? "null " : tc.getMember("actual").toString(),
tc.getMember("reason") == null ? "null " : tc.getMember("reason").toString()
);
file.caseVector.addElement( nc );
if ( nc.passed.equals("false") ) {