added safer filter for open.location in run.js
Showing
1 changed file
with
4 additions
and
1 deletions
... | @@ -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 = []; | ... | ... |
-
Please register or sign in to post a comment