puppeteer/third_party/phantomjs/test/module/webpage/scroll-position.js
2017-05-11 00:06:41 -07:00

19 lines
483 B
JavaScript

//! unsupported
var webpage = require('webpage');
test(function () {
var defaultPage = webpage.create();
assert_deep_equals(defaultPage.scrollPosition, {left:0,top:0});
}, "default scroll position");
test(function () {
var options = {
scrollPosition: {
left: 1,
top: 2
}
};
var customPage = webpage.create(options);
assert_deep_equals(customPage.scrollPosition, options.scrollPosition);
}, "custom scroll position");