Commit f0b8a38a f0b8a38ae09e8b30a3f807e86d6b9e04a8974755 by Nicolas Perriault

added safer filter for open.location in run.js

1 parent b1b5d0e4
......@@ -12,7 +12,10 @@ var casper = require('casper').create({
// Overriding Casper.open to prefix all test urls
casper.setFilter('open.location', function(location) {
return 'file://' + phantom.casperPath + '/' + location;
if (!/^http/.test(location)) {
return 'file://' + phantom.casperPath + '/' + location;
}
return location;
});
var tests = [];
......