Commit 82863faf 82863faf8b0ada90690d4d0e163513e7f0598ebf by Nicolas Perriault

jshint 1.0.0 compliance

1 parent 64b73b49
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * Create a mosaic image from all headline photos on BBC homepage 5 * Create a mosaic image from all headline photos on BBC homepage
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 var casper = require("casper").create(); 4 var casper = require("casper").create();
5 var dump = require("utils").dump; 5 var dump = require("utils").dump;
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 var casper = require("casper").create(); 4 var casper = require("casper").create();
5 5
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * A basic custom logging implementation. The idea is to (extremely) verbosely 5 * A basic custom logging implementation. The idea is to (extremely) verbosely
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * download the google logo image onto the local filesystem 5 * download the google logo image onto the local filesystem
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 var casper = require("casper").create({ 4 var casper = require("casper").create({
5 verbose: true 5 verbose: true
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 var casper = require("casper").create(); 4 var casper = require("casper").create();
5 5
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * This script will add a custom HTTP status code handler, here for 404 pages. 5 * This script will add a custom HTTP status code handler, here for 404 pages.
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 var casper = require("casper").create({ 4 var casper = require("casper").create({
5 loadImages: false, 5 loadImages: false,
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3
3 var links = []; 4 var links = [];
4 var casper = require("casper").create(); 5 var casper = require("casper").create();
5 6
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * Takes provided terms passed as arguments and query google for the number of 5 * Takes provided terms passed as arguments and query google for the number of
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * Capture multiple pages of google search results 5 * Capture multiple pages of google search results
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError casper console phantom require*/ 2 /*global CasperError, casper, console, phantom, require*/
3 /** 3 /**
4 * Google sample testing. 4 * Google sample testing.
5 * 5 *
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 var casper = require("casper").create({ 4 var casper = require("casper").create({
5 verbose: true, 5 verbose: true,
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 var casper = require("casper").create(); 4 var casper = require("casper").create();
5 var url = casper.cli.get(0); 5 var url = casper.cli.get(0);
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 var casper = require("casper").create({ 4 var casper = require("casper").create({
5 verbose: true 5 verbose: true
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * This script will capture a screenshot of a twitter account page 5 * This script will capture a screenshot of a twitter account page
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * This script will add a custom HTTP status code handler, here for 404 pages. 5 * This script will add a custom HTTP status code handler, here for 404 pages.
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 var failed = []; 4 var failed = [];
5 var start = null; 5 var start = null;
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * Just a silly game. 5 * Just a silly game.
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/ 2 /*global CasperError, console, phantom, require*/
3 3
4 /** 4 /**
5 * Translation using the Google Translate Service. 5 * Translation using the Google Translate Service.
......
1 /*global phantom CasperError patchRequire*/ 1 /*global phantom, CasperError, patchRequire, require:true, casper:true*/
2 2
3 if (!phantom.casperLoaded) { 3 if (!phantom.casperLoaded) {
4 console.log('This script must be invoked using the casperjs executable'); 4 console.log('This script must be invoked using the casperjs executable');
......
1 /*global casper*/ 1 /*global casper*/
2 /*jshint strict:false maxstatements:99*/ 2 /*jshint strict:false, maxstatements:99*/
3 3
4 casper.test.begin('HTTP authentication tests', 8, function(test) { 4 casper.test.begin('HTTP authentication tests', 8, function(test) {
5 casper.start('tests/site/index.html'); 5 casper.start('tests/site/index.html');
......
1 /*global casper*/ 1 /*global casper*/
2 /*jshint strict:false maxstatements: 99*/ 2 /*jshint strict:false, maxstatements: 99*/
3 var utils = require('utils'); 3 var utils = require('utils');
4 4
5 casper.test.begin('click() tests', 2, function(test) { 5 casper.test.begin('click() tests', 2, function(test) {
......
1 /*global casper*/ 1 /*global casper*/
2 /*jshint strict:false maxparams:99*/ 2 /*jshint strict:false, maxparams:99*/
3 casper.test.begin('mapping argument context', 1, function(test) { 3 casper.test.begin('mapping argument context', 1, function(test) {
4 casper.start(); 4 casper.start();
5 var context = { 5 var context = {
......
1 /*global casper __utils__*/ 1 /*global casper, __utils__*/
2 /*jshint strict:false*/ 2 /*jshint strict:false*/
3 var fs = require('fs'); 3 var fs = require('fs');
4 4
......
1 /*global casper __utils__*/ 1 /*global casper, __utils__*/
2 /*jshint strict:false*/ 2 /*jshint strict:false*/
3 casper.test.begin('handling frames', 16, function(test) { 3 casper.test.begin('handling frames', 16, function(test) {
4 casper.start('tests/site/frames.html'); 4 casper.start('tests/site/frames.html');
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError casper console phantom require*/ 2 /*global CasperError, casper, console, phantom, require*/
3 casper.test.begin('sendKeys() tests', 2, function(test) { 3 casper.test.begin('sendKeys() tests', 2, function(test) {
4 casper.start('tests/site/form.html', function() { 4 casper.start('tests/site/form.html', function() {
5 this.sendKeys('input[name="email"]', 'duke@nuk.em'); 5 this.sendKeys('input[name="email"]', 'duke@nuk.em');
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError casper console phantom require*/ 2 /*global CasperError, casper, console, phantom, require*/
3 var utils = require('utils') 3 var utils = require('utils')
4 4
5 if (utils.ltVersion(phantom.version, '1.8.0')) { 5 if (utils.ltVersion(phantom.version, '1.8.0')) {
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global casper __utils__*/ 2 /*global casper, __utils__*/
3 casper.test.begin('logging tests', 4, function(test) { 3 casper.test.begin('logging tests', 4, function(test) {
4 casper.start('tests/site/index.html'); 4 casper.start('tests/site/index.html');
5 5
......
1 /*global casper*/ 1 /*global casper*/
2 /*jshint strict:false maxstatements:99*/ 2 /*jshint strict:false, maxstatements:99*/
3 casper.test.begin('mouseEvent() tests', 16, function(test) { 3 casper.test.begin('mouseEvent() tests', 16, function(test) {
4 casper.start('tests/site/mouse-events.html', function() { 4 casper.start('tests/site/mouse-events.html', function() {
5 test.assert(this.mouseEvent('mousedown', '#test1'), 'Casper.mouseEvent() can dispatch a mousedown event'); 5 test.assert(this.mouseEvent('mousedown', '#test1'), 'Casper.mouseEvent() can dispatch a mousedown event');
......
1 /*jshint strict:false maxstatements:99*/ 1 /*jshint strict:false, maxstatements:99*/
2 /*global CasperError casper console phantom require*/ 2 /*global CasperError, casper, console, phantom, require*/
3 var utils = require('utils'); 3 var utils = require('utils');
4 var x = require('casper').selectXPath; 4 var x = require('casper').selectXPath;
5 5
......
1 /*global casper __utils__*/ 1 /*global casper, __utils__*/
2 /*jshint strict:false*/ 2 /*jshint strict:false*/
3 var x = require('casper').selectXPath; 3 var x = require('casper').selectXPath;
4 4
......
1 /*global casper*/ 1 /*global casper*/
2 /*jshint strict:false maxstatements:99*/ 2 /*jshint strict:false, maxstatements:99*/
3 var cli = require('cli'); 3 var cli = require('cli');
4 4
5 casper.test.begin('parsing an empty argument list', 12, function(test) { 5 casper.test.begin('parsing an empty argument list', 12, function(test) {
......
1 /*global casper*/ 1 /*global casper*/
2 /*jshint strict:false maxstatements:99*/ 2 /*jshint strict:false, maxstatements:99*/
3 var pagestack = require('pagestack'); 3 var pagestack = require('pagestack');
4 var utils = require('utils'); 4 var utils = require('utils');
5 var webpage = require('webpage'); 5 var webpage = require('webpage');
......
1 /*global casper*/ 1 /*global casper*/
2 /*jshint strict:false maxstatements:99*/ 2 /*jshint strict:false, maxstatements:99*/
3 var fs = require('fs'); 3 var fs = require('fs');
4 4
5 casper.test.begin('Common assertions tests', 43, function(test) { 5 casper.test.begin('Common assertions tests', 43, function(test) {
......
1 /*jshint strict:false eqeqeq:false*/ 1 /*jshint strict:false, eqeqeq:false*/
2 /*global CasperError casper console phantom require*/ 2 /*global CasperError, casper, console, phantom, require*/
3 var steps = []; 3 var steps = [];
4 4
5 casper.test.begin('Tester.begin() configuration', 10, { 5 casper.test.begin('Tester.begin() configuration', 10, {
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError casper console phantom require*/ 2 /*global CasperError, casper, console, phantom, require*/
3 var fs = require('fs'); 3 var fs = require('fs');
4 4
5 casper.test.begin('Tester.sortFiles()', 1, function suite(test) { 5 casper.test.begin('Tester.sortFiles()', 1, function suite(test) {
......
1 /*jshint strict:false maxstatements:99 maxcomplexity:99 */ 1 /*jshint strict:false, maxstatements:99, maxcomplexity:99*/
2 /*global CasperError casper console phantom require*/ 2 /*global CasperError, casper, console, phantom, require*/
3 3
4 var TestCaseResult = require('tester').TestCaseResult; 4 var TestCaseResult = require('tester').TestCaseResult;
5 5
......
1 /*jshint strict:false*/ 1 /*jshint strict:false*/
2 /*global CasperError casper console phantom require*/ 2 /*global CasperError, casper, console, phantom, require*/
3 3
4 var TestCaseResult = require('tester').TestCaseResult, 4 var TestCaseResult = require('tester').TestCaseResult,
5 TestSuiteResult = require('tester').TestSuiteResult; 5 TestSuiteResult = require('tester').TestSuiteResult;
......
1 /*global casper __utils__*/ 1 /*global casper, __utils__*/
2 /*jshint strict:false*/ 2 /*jshint strict:false*/
3 var tester = require('tester'); 3 var tester = require('tester');
4 var testpage = require('webpage').create(); 4 var testpage = require('webpage').create();
......