Permalink
Browse files

Added more tests

  • Loading branch information...
1 parent 735d119 commit cd030a3e04b61277a354b891e5c6efeebda26c0b Sebastian Werner committed Oct 11, 2011
Showing with 19 additions and 0 deletions.
  1. +19 −0 test/test.js
View
@@ -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.