Port the test of web page's zoom factor.

https://github.com/ariya/phantomjs/issues/12439
2.0
Ariya Hidayat 2014-10-08 06:51:16 -07:00
parent 2cbb695490
commit ce66f290c3
2 changed files with 16 additions and 4 deletions

View File

@ -0,0 +1,16 @@
var assert = require('../../assert');
var webpage = require('webpage');
var page = webpage.create();
assert.strictEqual(page.zoomFactor, 1.0);
page.zoomFactor = 1.5;
assert.strictEqual(page.zoomFactor, 1.5);
page.zoomFactor = 2.0;
assert.strictEqual(page.zoomFactor, 2.0);
page.zoomFactor = 0.5;
assert.strictEqual(page.zoomFactor, 0.5);
// TODO: render using zoomFactor != 1 and check the result

View File

@ -171,10 +171,6 @@ describe("WebPage object", function() {
expect(page.settings).toNotEqual({});
});
it("should have zoomFactor of 1", function() {
expect(page.zoomFactor).toEqual(1.0);
});
checkViewportSize(page, {height:300,width:400});
it("should handle keydown event", function() {