Skip to content

Commit

Permalink
Added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Werner committed Oct 11, 2011
1 parent 735d119 commit cd030a3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,22 @@ test("Scrolling + Zooming via API (Auto Origin)", function() {
equal(values.zoom, 1.7);

});

test("Scrolling + Zooming + Scrolling via API", function() {

var scroller = new Scroller(null, {
zooming: true
});
equal(typeof scroller, "object");
scroller.setDimensions(1000, 600, 5000, 5000);
scroller.scrollTo(300, 500);
scroller.zoomTo(1.7);
scroller.scrollTo(500, 700);

var values = scroller.getValues();
equal(typeof values, "object");
equal(values.left, 500);
equal(values.top, 700);
equal(values.zoom, 1.7);

});

0 comments on commit cd030a3

Please sign in to comment.