| Index: LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas-throw.html
|
| diff --git a/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas-throw.html b/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas-throw.html
|
| index 5345dde11a23279992cf95b53e79927075b08dd8..d3494c44ae5f2acef89ea01713ccbac18673b174 100644
|
| --- a/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas-throw.html
|
| +++ b/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas-throw.html
|
| @@ -8,9 +8,11 @@
|
| <body>
|
| <script>
|
|
|
| -test(function() {
|
| - assert_true('ScrollState' in window, "'ScrollState' in window");
|
| -}, "These tests only work with scroll customization enabled.");
|
| +if (!window.internals || !window.internals.runtimeFlags.scrollCustomizationEnabled) {
|
| + console.log("These tests only work with window.internals exposed, " +
|
| + "and require scroll customization.");
|
| + done();
|
| +}
|
|
|
| function testConsumingDelta(dx, dy, consume_x, consume_y, testName, expectedError) {
|
| test(function() {
|
| @@ -23,19 +25,17 @@
|
| }, testName);
|
| }
|
|
|
| -if ('ScrollState' in window) {
|
| - // Consume from an event with a delta of (5, 5).
|
| - testConsumingDelta(5, 5, 6, 4, "Overconsumed X");
|
| - testConsumingDelta(5, 5, 4, 6, "Overconsumed Y");
|
| - testConsumingDelta(5, 5, -1, 4, "Can't increase X delta");
|
| - testConsumingDelta(5, 5, 4, -1, "Can't increase Y delta");
|
| +// Consume from an event with a delta of (5, 5).
|
| +testConsumingDelta(5, 5, 6, 4, "Overconsumed X");
|
| +testConsumingDelta(5, 5, 4, 6, "Overconsumed Y");
|
| +testConsumingDelta(5, 5, -1, 4, "Can't increase X delta");
|
| +testConsumingDelta(5, 5, 4, -1, "Can't increase Y delta");
|
|
|
| - // Consume from an event with a delta of (-5, -5).
|
| - testConsumingDelta(-5, -5, -6, -4, "Overconsumed X with negative delta");
|
| - testConsumingDelta(-5, -5, -4, -6, "Overconsumed Y with negative delta");
|
| - testConsumingDelta(-5, -5, 1, -4, "Can't increase X delta magnitude");
|
| - testConsumingDelta(-5, -5, -4, 1, "Can't increase Y delta magnitude");
|
| -}
|
| +// Consume from an event with a delta of (-5, -5).
|
| +testConsumingDelta(-5, -5, -6, -4, "Overconsumed X with negative delta");
|
| +testConsumingDelta(-5, -5, -4, -6, "Overconsumed Y with negative delta");
|
| +testConsumingDelta(-5, -5, 1, -4, "Can't increase X delta magnitude");
|
| +testConsumingDelta(-5, -5, -4, 1, "Can't increase Y delta magnitude");
|
| </script>
|
| </body>
|
| </html>
|
|
|