@@ -98,22 +98,23 @@ Rectangle {
9898 // move mouse to center
9999 mouseMove(zoomableImage, zoomableImage.width / 2, zoomableImage.height / 2);
100100
101+ var oldScale = image.scale;
101102 // Test Zoom-in Zoom-out twice.
102103 for (var c=0; c<2; c++) {
103104 // zoom in
104105 for (var i=0; i<10; i++) {
105106 mouseWheel(zoomableImage, zoomableImage.width / 2, zoomableImage.height / 2, 0, 10);
106− tryCompare(image, "scale", 1.0 + (i + 1) * 0.1);
107− compare(flickable.contentWidth, lazyImage.width * image.scale);
108− compare(flickable.contentHeight, lazyImage.height * image.scale);
107+ tryCompare(image, "scale", oldScale + (i + 1) * 0.1);
108+ compare(flickable.contentWidth, Math.max(lazyImage.width * image.scale, flickable.width));
109+ compare(flickable.contentHeight, Math.max(lazyImage.height * image.scale, flickable.height));
109110 }
110111
111112 // zoom out
112113 for (var i=0; i<10; i++) {
113114 mouseWheel(zoomableImage, zoomableImage.width / 2, zoomableImage.height / 2, 0, -10);
114− tryCompare(image, "scale", 2.0 - (i + 1) * 0.1);
115− compare(flickable.contentWidth, lazyImage.width * image.scale);
116− compare(flickable.contentHeight, lazyImage.height * image.scale);
115+ tryCompare(image, "scale", oldScale + 1.0 - (i + 1) * 0.1);
116+ compare(flickable.contentWidth, Math.max(lazyImage.width * image.scale, flickable.width));
117+ compare(flickable.contentHeight, Math.max(lazyImage.height * image.scale, flickable.height));
117118 }
118119 }
119120 }
@@ -124,15 +125,15 @@ Rectangle {
124125 answer1: true,
125126 answer2: false,
126127 answer3: true,
127− answer4: 1.0,
128− answer5: 1.0 },
128+ answer4: 0.5,
129+ answer5: 0.5 },
129130 { source:widgetData2["source"],
130131 zoomable:true,
131132 answer1: false,
132133 answer2: true,
133134 answer3: false,
134− answer4: 1.7740461882048026,
135− answer5: 1.0 }
135+ answer4: 0.8870230941024013,
136+ answer5: 0.5 }
136137 ]
137138 }
138139
@@ -179,13 +180,15 @@ Rectangle {
179180 compare(newScale > oldScale, data.answer2, "scale factor didn't changed");
180181 compare(signalSpy.count == 0, data.answer3, "scale signal count error");
181182 compare(newScale, data.answer4, "scale factor error");
182− compare(flickable.contentWidth, lazyImage.width * image.scale);
183− compare(flickable.contentHeight, lazyImage.height * image.scale);
183+ compare(flickable.contentWidth, Math.max(lazyImage.width * image.scale, flickable.width));
184+ compare(flickable.contentHeight, Math.max(lazyImage.height * image.scale, flickable.height));
184185
185186 wait(3000); // have to delay between two consequent pinch event.
186187 // pinch zoom-out
187188 touchPinch(zoomableImage, x1End, y1End, x1Start, y1Start, x2End, y2End, x2Start, y2Start);
188189 tryCompare(image, "scale", data.answer5);
190+ compare(flickable.contentWidth, Math.max(lazyImage.width * image.scale, flickable.width));
191+ compare(flickable.contentHeight, Math.max(lazyImage.height * image.scale, flickable.height));
189192 }
190193 }
191194 }