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({ ...@@ -12,7 +12,10 @@ var casper = require('casper').create({
12 12
13 // Overriding Casper.open to prefix all test urls 13 // Overriding Casper.open to prefix all test urls
14 casper.setFilter('open.location', function(location) { 14 casper.setFilter('open.location', function(location) {
15 return 'file://' + phantom.casperPath + '/' + location; 15 if (!/^http/.test(location)) {
16 return 'file://' + phantom.casperPath + '/' + location;
17 }
18 return location;
16 }); 19 });
17 20
18 var tests = []; 21 var tests = [];
......