Commit 90646423 906464239aa8fa8e5ab31d5b93aa34a8a8f0f6f9 by Laurent Jouanneau

Fixed jshint issues

1 parent 23fcb8e9
......@@ -925,16 +925,16 @@ Casper.prototype.getPageContent = function getPageContent() {
if (!head || !body) {
return null;
}
if (head.childNodes.length == 0 &&
if (head.childNodes.length === 0 &&
body.childNodes.length === 1 &&
__utils__.findOne('body pre[style]')) {
return __utils__.findOne('body pre').textContent.trim();
}
if (head.childNodes.length === 1 &&
body.childNodes.length === 1 &&
head.childNodes[0].localName == 'link' &&
head.childNodes[0].getAttribute('href') == 'resource://gre-resources/plaintext.css' &&
body.childNodes[0].localName == 'pre' ) {
head.childNodes[0].localName === 'link' &&
head.childNodes[0].getAttribute('href') === 'resource://gre-resources/plaintext.css' &&
body.childNodes[0].localName === 'pre' ) {
return body.childNodes[0].textContent.trim();
}
return null;
......
......@@ -619,7 +619,7 @@
var center_x = 1, center_y = 1;
try {
var pos = elem.getBoundingClientRect();
center_x = Math.floor((pos.left + pos.right) / 2),
center_x = Math.floor((pos.left + pos.right) / 2);
center_y = Math.floor((pos.top + pos.bottom) / 2);
} catch(e) {}
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, {
this.testCodes.push(118);
}
if (utils.ltVersion(phantom.version, '1.9.0')
|| utils.gteVersion(phantom.version, '1.9.2')
|| isGecko) {
if (utils.ltVersion(phantom.version, '1.9.0') ||
utils.gteVersion(phantom.version, '1.9.2') ||
isGecko) {
// https://github.com/ariya/phantomjs/issues/11163
this.testCodes = this.testCodes.concat([
400, 401, 402, 403, 404, 405, 406, 407, 409, 410, 411, 412, 413,
......