rem: result.failed = false; result.passed = true; 
add: var failureType = result.failed ? "failure" : "error"; if (failureType == this.expectedFailureType) { result.failed = false; result.passed = true; } else { result.failed = true; result.failureMessage = "Expected "+this.expectedFailureType+", but "+failureType+" occurred instead"; } 
context:     _checkExpectedFailure : function(result) {        if (this.expectedFailure != null) {            if (this.expectedFailureJustSet) {                this.expectedFailureJustSet = false;                return;            }            if (result.passed) {                result.passed = false;                result.failed = true;                result.failureMessage = "Expected " + this.expectedFailureType + " did not occur.";            } else {                if (PatternMatcher.matches(this.expectedFailure, result.failureMessage)) {                    result.failed = false;                    result.passed = true;                } else {                    result.failed = true;                    result.failureMessage = "Expected " + this.expectedFailureType + " message '" + this.expectedFailure                                            + "' but was '" + result.failureMessage + "'";                }            }            this.expectedFailure = null;            this.expectedFailureType = null;        }    },
meta: 3175	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3175/34f3afea81e85e36ad46c1cc1603be1f1ebb6368/selenium-testrunner.js/buggy/code/javascript/core/scripts/selenium-testrunner.js