| Index: LayoutTests/fast/scrolling/fractional-scroll-offset-document.html
|
| diff --git a/LayoutTests/fast/scrolling/fractional-scroll-offset-document.html b/LayoutTests/fast/scrolling/fractional-scroll-offset-document.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5beb02f4135607ae1b8ffdf20a5e5fe00af6c242
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/scrolling/fractional-scroll-offset-document.html
|
| @@ -0,0 +1,36 @@
|
| +<!DOCTYPE HTML>
|
| +<body style="width:30000px;height:30000px" onload="runTest()">
|
| +</body>
|
| +
|
| +<script src="../../resources/js-test.js"></script>
|
| +<script>
|
| +description("Verifies that document scrolling supports fractional offset.");
|
| +
|
| +var floatPrecision = 0.00001;
|
| +function checkScrollOffset(offset_x, offset_y)
|
| +{
|
| + shouldBeCloseTo('document.documentElement.scrollTop', offset_y, floatPrecision);
|
| + shouldBeCloseTo('document.documentElement.scrollLeft', offset_x, floatPrecision);
|
| +}
|
| +
|
| +function scroll()
|
| +{
|
| + eventSender.gestureScrollBegin(100.1, 300.2);
|
| + checkScrollOffset(0, 0);
|
| + eventSender.gestureScrollUpdate(-20.5, -10.2);
|
| + checkScrollOffset(20.5, 10.2);
|
| + eventSender.gestureScrollUpdate(10.9, -20.9);
|
| + checkScrollOffset(9.6, 31.1);
|
| + eventSender.gestureScrollUpdate(100.4, 220.9);
|
| + checkScrollOffset(0.0, 0.0);
|
| + eventSender.gestureScrollEnd(0, 0);
|
| +}
|
| +
|
| +function runTest()
|
| +{
|
| + if (window.eventSender)
|
| + scroll();
|
| +}
|
| +
|
| +</script>
|
| +</html>
|
|
|