clearTimeout(gFailureTimeout); 
function DocumentLoaded(){    var key = IFrameToKey();    switch (gState) {        case 1:            // First document has been loaded. Save its key and            // proceed to load the second document.            gPart1Key = key;            StartCurrentURI(2);            break;        case 2:            // Both documents have been loaded. Compare the renderings and see            // if the comparison result matches the expected result specified            // in the manifest.                        // whether the two renderings match:            var equal = (key == gPart1Key);            // whether the comparison result matches what is in the manifest            var test_passed = (equal == gURLs[0].equal);            // what is expected on this platform (PASS, FAIL, or RANDOM)            var expected = gURLs[0].expected;                        var outputs = {};            const randomMsg = " (RESULT EXPECTED TO BE RANDOM)";            outputs[EXPECTED_PASS] = {true: "PASS",                                      false: "UNEXPECTED FAIL"};            outputs[EXPECTED_FAIL] = {true: "UNEXPECTED PASS",                                      false: "KNOWN FAIL"};            outputs[EXPECTED_RANDOM] = {true: "PASS" + randomMsg,                                        false: "KNOWN FAIL" + randomMsg};                        var result = "REFTEST " + outputs[expected][test_passed] + ": ";            if (!gURLs[0].equal) {                result += "(!=) ";            }            result += gURLs[0].url1.spec; // the URL being tested            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."    }}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/0cb1771f10f2bf93ca5719c0013338daa165b0b8/reftest.js/clean/layout/tools/reftest/reftest.js