From 09c2a8c1e1534523f269a4abf7586ad5b0c330c6 Mon Sep 17 00:00:00 2001 From: "Kearwood (Kip) Gilbert" Date: Fri, 25 Jul 2014 14:20:45 -0700 Subject: [PATCH] Bug 1022818 - Part 3: Tests for CSSOM-View Smooth-Scroll DOM API Methods and MSD Animation. r=bz - Verify that instant scroll-behavior is synchronous. - Verify that smooth scroll-behavior is asynchronous. - Verify that smooth scroll-behavior is triggered by CSSOM-View DOM methods. - Verify that instant scroll-behavior interrupts smooth scroll-behavior animation. - Verify that smooth scroll-behavior is not framerate dependant. - Verify that smooth scroll-behavior physics simulations used by animations converge and allow the animation to reach completion. - CSSOM-View scroll-behavior smooth scroll animations must produce the same results indendently of frame-rate: - Reference samples of scroll position for each frame are captured from a smooth scroll at 120fps for variations in X-Distance, Y-Distance. - Test samples are captured from an animation with the same parameters at varying framerates. - Variance in position at each sampled interval is compared to the 120fps reference. To pass the test, the position of each test sample must match the reference position with a tolerance of one test sample frame's range of motion. This range of motion is calculated by the position delta of the reference samples one test frame duration before and after. - The duration of the reference sample animation and the test sample animation must match within 1 frame to pass the test. - The simulation driving the animation must converge and stop on the destination position for the test to pass. --- layout/generic/test/mochitest.ini | 1 + layout/generic/test/test_scroll_behavior.html | 252 ++++++++++++++++++ 2 files changed, 253 insertions(+) create mode 100644 layout/generic/test/test_scroll_behavior.html diff --git a/layout/generic/test/mochitest.ini b/layout/generic/test/mochitest.ini index f3d30cd0955d..762084ecdf0b 100644 --- a/layout/generic/test/mochitest.ini +++ b/layout/generic/test/mochitest.ini @@ -123,6 +123,7 @@ skip-if = buildapp == 'mulet' || buildapp == 'b2g' || e10s # b2g(plugins not sup skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported) [test_plugin_position.xhtml] skip-if = e10s +[test_scroll_behavior.html] [test_selection_expanding.html] skip-if = buildapp == 'mulet' || buildapp == 'b2g' # b2g(mouse selection not working) b2g-debug(mouse selection not working) b2g-desktop(mouse selection not working) support-files = selection_expanding_xbl.xml diff --git a/layout/generic/test/test_scroll_behavior.html b/layout/generic/test/test_scroll_behavior.html new file mode 100644 index 000000000000..e23d6bf19e42 --- /dev/null +++ b/layout/generic/test/test_scroll_behavior.html @@ -0,0 +1,252 @@ + + + + + Tests for CSSOM-View Smooth-Scroll DOM API Methods and MSD Animation + + + + + + +
+
+ +
+
+ +