fixed events.js sample using wrong event names
Showing
1 changed file
with
5 additions
and
5 deletions
... | @@ -4,23 +4,23 @@ | ... | @@ -4,23 +4,23 @@ |
4 | */ | 4 | */ |
5 | var casper = require('casper').create(); | 5 | var casper = require('casper').create(); |
6 | 6 | ||
7 | casper.on('casper.http.status.200', function(resource) { | 7 | casper.on('http.status.200', function(resource) { |
8 | casper.echo(resource.url + ' is OK', 'INFO'); | 8 | casper.echo(resource.url + ' is OK', 'INFO'); |
9 | }); | 9 | }); |
10 | 10 | ||
11 | casper.on('casper.http.status.301', function(resource) { | 11 | casper.on('http.status.301', function(resource) { |
12 | casper.echo(resource.url + ' is permanently redirected', 'PARAMETER'); | 12 | casper.echo(resource.url + ' is permanently redirected', 'PARAMETER'); |
13 | }); | 13 | }); |
14 | 14 | ||
15 | casper.on('casper.http.status.302', function(resource) { | 15 | casper.on('http.status.302', function(resource) { |
16 | casper.echo(resource.url + ' is temporarily redirected', 'PARAMETER'); | 16 | casper.echo(resource.url + ' is temporarily redirected', 'PARAMETER'); |
17 | }); | 17 | }); |
18 | 18 | ||
19 | casper.on('casper.http.status.404', function(resource) { | 19 | casper.on('http.status.404', function(resource) { |
20 | casper.echo(resource.url + ' is not found', 'COMMENT'); | 20 | casper.echo(resource.url + ' is not found', 'COMMENT'); |
21 | }); | 21 | }); |
22 | 22 | ||
23 | casper.on('casper.http.status.500', function(resource) { | 23 | casper.on('http.status.500', function(resource) { |
24 | casper.echo(resource.url + ' is in error', 'ERROR'); | 24 | casper.echo(resource.url + ' is in error', 'ERROR'); |
25 | }); | 25 | }); |
26 | 26 | ... | ... |
-
Please register or sign in to post a comment