rem: form.submit(); 
add: if (isQueryParameterTrue("save")) { saveToFile(resultsUrl, form); } else { form.submit(); } 
context: function postTestResults(suiteFailed, suiteTable) {    form = document.createElement("form");    document.body.appendChild(form);    form.id = "resultsForm";    form.method="post";    form.target="myiframe";    var resultsUrl = getQueryParameter("resultsUrl");    if (!resultsUrl) {        resultsUrl = "./postResults";    }    var actionAndParameters = resultsUrl.split('?',2);    form.action = actionAndParameters[0];    var resultsUrlQueryString = actionAndParameters[1];    form.createHiddenField = function(name, value) {        input = document.createElement("input");        input.type = "hidden";        input.name = name;        input.value = value;        this.appendChild(input);    };    if (resultsUrlQueryString) {        var clauses = resultsUrlQueryString.split('&');        for (var i = 0; i < clauses.length; i++) {            var keyValuePair = clauses[i].split('=',2);            var key = unescape(keyValuePair[0]);            var value = unescape(keyValuePair[1]);            form.createHiddenField(key, value);        }    }    form.createHiddenField("selenium.version", Selenium.version);    form.createHiddenField("selenium.revision", Selenium.revision);        form.createHiddenField("result", suiteFailed == true ? "failed" : "passed");    form.createHiddenField("totalTime", Math.floor((currentTime - startTime) / 1000));    form.createHiddenField("numTestPasses", numTestPasses);    form.createHiddenField("numTestFailures", numTestFailures);    form.createHiddenField("numCommandPasses", numCommandPasses);    form.createHiddenField("numCommandFailures", numCommandFailures);    form.createHiddenField("numCommandErrors", numCommandErrors);    // Create an input for each test table.  The inputs are named    // testTable.1, testTable.2, etc.    for (rowNum = 1; rowNum < suiteTable.rows.length;rowNum++) {        // If there is a second column, then add a new input        if (suiteTable.rows[rowNum].cells.length > 1) {            var resultCell = suiteTable.rows[rowNum].cells[1];            form.createHiddenField("testTable." + rowNum, resultCell.innerHTML);            // remove the resultCell, so it's not included in the suite HTML            resultCell.parentNode.removeChild(resultCell);         }    }    // Add HTML for the suite itself    form.createHiddenField("suite", suiteTable.parentNode.innerHTML);    form.submit();    document.body.removeChild(form);}
meta: 3428	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3428/7c8f281c97245c878f36003ba018f44622c0c718/selenium-testrunner.js/buggy/code/javascript/core/scripts/selenium-testrunner.js