rem: var fullURL = "/TestRunner.html?singletest=" + escape(browserBot.modalDialogTest) + "&autoURL=" + escape(url) + "&runInterval=" + runInterval; 
add:   var doc_location = document.location.toString(); var end_of_base_ref = doc_location.indexOf('TestRunner.html') var base_ref = doc_location.substring(0,end_of_base_ref)  var fullURL = base_ref + "TestRunner.html?singletest=" + escape(browserBot.modalDialogTest) + "&autoURL=" + escape(url) + "&runInterval=" + runInterval; 
context:     function modifyWindowToRecordPopUpDialogs(window, browserBot) {        // we will call the previous version of this method from within our own interception        oldShowModalDialog = window.showModalDialog;        window.showModalDialog = function(url, args, features) {            var fullURL = "/TestRunner.html?singletest=" + escape(browserBot.modalDialogTest) + "&autoURL=" + escape(url) + "&runInterval=" + runInterval;            browserBot.modalDialogTest = null;            var returnValue = oldShowModalDialog(fullURL, args, features);            //window.open(fullURL);            //alert(returnValue);            return returnValue;        };        window.alert = function(alert){browserBot.recordedAlerts.push(alert);};        window.confirm = function(message){            browserBot.recordedConfirmations.push(message);            var result = browserBot.nextConfirmResult;            browserBot.nextConfirmResult = true;            return result;        };    }
meta: 3175	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3175/ba056b47f419a2a95c4c6651a92db65a8276f84c/selenium-browserbot.js/buggy/code/javascript/selenium-browserbot.js