rem: var result = "REFTEST "; 
context: function DocumentLoaded(){    var key = IFrameToKey();    switch (gState) {        case 1:            gPart1Key = key;            StartCurrentURI(2);            break;        case 2:            var equal = (key == gPart1Key);            var result = "REFTEST ";            var test_passed = (equal == gURLs[0].equal);            var expected = gURLs[0].expected;            switch (expected) {                case EXPECTED_PASS:                    if (!test_passed) result += "UNEXPECTED ";                    break;                case EXPECTED_FAIL:                    if (test_passed) result += "UNEXPECTED ";                    break;                case EXPECTED_RANDOM:                    result += "(RESULT EXPECTED TO BE RANDOM) "                    break;            }            if (test_passed) {                result += "PASS: ";            } else {                result += "FAIL: ";            }            if (!gURLs[0].equal) {                result += "(!=) ";            }            result += gURLs[0].url1.spec;            dump(result + "\n");            if (!test_passed && expected == EXPECTED_PASS) {                dump("REFTEST   IMAGE 1 (TEST): " + gPart1Key + "\n");                dump("REFTEST   IMAGE 2 (REFERENCE): " + key + "\n");            }            gPart1Key = undefined;            gURLs.shift();            StartCurrentTest();            break;        default:            throw "Unexpected state."    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/abbda1bb0783bcf24c310c156f7a09442eaef7fc/reftest.js/clean/layout/tools/reftest/reftest.js