Commit f5f6b545 f5f6b545c6ccd9e7a5be626244e1ebd19e1b4156 by Laurent Jouanneau

Refs #482: casper.viewport, different time for phantomjs

1 parent 60020675
...@@ -1897,7 +1897,7 @@ Casper.prototype.viewport = function viewport(width, height, then) { ...@@ -1897,7 +1897,7 @@ Casper.prototype.viewport = function viewport(width, height, then) {
1897 width: width, 1897 width: width,
1898 height: height 1898 height: height
1899 }; 1899 };
1900 1900 var time = (phantom.casperEngine == 'slimerjs'?400:100);
1901 return this.then(function _step() { 1901 return this.then(function _step() {
1902 this.waitStart(); 1902 this.waitStart();
1903 setTimeout(function _check(self) { 1903 setTimeout(function _check(self) {
...@@ -1906,7 +1906,7 @@ Casper.prototype.viewport = function viewport(width, height, then) { ...@@ -1906,7 +1906,7 @@ Casper.prototype.viewport = function viewport(width, height, then) {
1906 if (utils.isFunction(then)){ 1906 if (utils.isFunction(then)){
1907 self.then(then); 1907 self.then(then);
1908 } 1908 }
1909 }, 300, this); 1909 }, time, this);
1910 }); 1910 });
1911 }; 1911 };
1912 1912
......