Commit 90646423 906464239aa8fa8e5ab31d5b93aa34a8a8f0f6f9 by Laurent Jouanneau

Fixed jshint issues

1 parent 23fcb8e9
...@@ -925,16 +925,16 @@ Casper.prototype.getPageContent = function getPageContent() { ...@@ -925,16 +925,16 @@ Casper.prototype.getPageContent = function getPageContent() {
925 if (!head || !body) { 925 if (!head || !body) {
926 return null; 926 return null;
927 } 927 }
928 if (head.childNodes.length == 0 && 928 if (head.childNodes.length === 0 &&
929 body.childNodes.length === 1 && 929 body.childNodes.length === 1 &&
930 __utils__.findOne('body pre[style]')) { 930 __utils__.findOne('body pre[style]')) {
931 return __utils__.findOne('body pre').textContent.trim(); 931 return __utils__.findOne('body pre').textContent.trim();
932 } 932 }
933 if (head.childNodes.length === 1 && 933 if (head.childNodes.length === 1 &&
934 body.childNodes.length === 1 && 934 body.childNodes.length === 1 &&
935 head.childNodes[0].localName == 'link' && 935 head.childNodes[0].localName === 'link' &&
936 head.childNodes[0].getAttribute('href') == 'resource://gre-resources/plaintext.css' && 936 head.childNodes[0].getAttribute('href') === 'resource://gre-resources/plaintext.css' &&
937 body.childNodes[0].localName == 'pre' ) { 937 body.childNodes[0].localName === 'pre' ) {
938 return body.childNodes[0].textContent.trim(); 938 return body.childNodes[0].textContent.trim();
939 } 939 }
940 return null; 940 return null;
......
...@@ -619,7 +619,7 @@ ...@@ -619,7 +619,7 @@
619 var center_x = 1, center_y = 1; 619 var center_x = 1, center_y = 1;
620 try { 620 try {
621 var pos = elem.getBoundingClientRect(); 621 var pos = elem.getBoundingClientRect();
622 center_x = Math.floor((pos.left + pos.right) / 2), 622 center_x = Math.floor((pos.left + pos.right) / 2);
623 center_y = Math.floor((pos.top + pos.bottom) / 2); 623 center_y = Math.floor((pos.top + pos.bottom) / 2);
624 } catch(e) {} 624 } catch(e) {}
625 evt.initMouseEvent(type, true, true, window, 1, 1, 1, center_x, center_y, false, false, false, false, 0, elem); 625 evt.initMouseEvent(type, true, true, window, 1, 1, 1, center_x, center_y, false, false, false, false, 0, elem);
......
...@@ -27,9 +27,9 @@ casper.test.begin("HTTP status code handling", 163, { ...@@ -27,9 +27,9 @@ casper.test.begin("HTTP status code handling", 163, {
27 this.testCodes.push(118); 27 this.testCodes.push(118);
28 } 28 }
29 29
30 if (utils.ltVersion(phantom.version, '1.9.0') 30 if (utils.ltVersion(phantom.version, '1.9.0') ||
31 || utils.gteVersion(phantom.version, '1.9.2') 31 utils.gteVersion(phantom.version, '1.9.2') ||
32 || isGecko) { 32 isGecko) {
33 // https://github.com/ariya/phantomjs/issues/11163 33 // https://github.com/ariya/phantomjs/issues/11163
34 this.testCodes = this.testCodes.concat([ 34 this.testCodes = this.testCodes.concat([
35 400, 401, 402, 403, 404, 405, 406, 407, 409, 410, 411, 412, 413, 35 400, 401, 402, 403, 404, 405, 406, 407, 409, 410, 411, 412, 413,
......