| Index: LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-basic.html
|
| diff --git a/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-basic.html b/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-basic.html
|
| index 6fe3caf1c67bc107ad7bd3e946e0beddc4442158..ad320eb03746887c8cea25c667d7befe9c39e292 100644
|
| --- a/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-basic.html
|
| +++ b/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-basic.html
|
| @@ -9,54 +9,54 @@
|
| <body>
|
| <script>
|
|
|
| -if (!window.internals || !window.internals.runtimeFlags.scrollCustomizationEnabled) {
|
| - console.log("These tests only work with window.internals exposed, " +
|
| - "and require scroll customization.");
|
| - done();
|
| -}
|
| -
|
| test(function() {
|
| - var scrollState = new ScrollState();
|
| - assert_equals(scrollState.deltaX, 0);
|
| - assert_equals(scrollState.deltaY, 0);
|
| - assert_equals(scrollState.deltaGranularity, 0);
|
| - assert_equals(scrollState.velocityX, 0);
|
| - assert_equals(scrollState.velocityY, 0);
|
| - assert_equals(scrollState.inInertialPhase, false);
|
| - assert_equals(scrollState.isBeginning, false);
|
| - assert_equals(scrollState.isEnding, false);
|
| - assert_equals(scrollState.fromUserInput, false);
|
| - assert_equals(scrollState.shouldPropagate, true);
|
| -}, "Empty constructor behaves correctly.");
|
| + assert_true('ScrollState' in window, "'ScrollState' in window");
|
| +}, "These tests only work with scroll customization enabled.");
|
|
|
| -test(function() {
|
| - var deltaX = 12.5;
|
| - var deltaY = 14.9;
|
| - var deltaGranularity = 148.3;
|
| - var velocityX = 23.7;
|
| - var velocityY = 2.5;
|
| - var inInertialPhase = true;
|
| - var isBeginning = true;
|
| - var isEnding = true;
|
| - var scrollState = new ScrollState(deltaX, deltaY, deltaGranularity, velocityX,
|
| - velocityY, inInertialPhase, isBeginning, isEnding);
|
| - assert_equals(scrollState.deltaX, deltaX);
|
| - assert_equals(scrollState.deltaY, deltaY);
|
| - assert_equals(scrollState.deltaGranularity, deltaGranularity);
|
| - assert_equals(scrollState.velocityX, velocityX);
|
| - assert_equals(scrollState.velocityY, velocityY);
|
| - assert_equals(scrollState.inInertialPhase, inInertialPhase);
|
| - assert_equals(scrollState.isBeginning, isBeginning);
|
| - assert_equals(scrollState.isEnding, isEnding);
|
| - assert_equals(scrollState.fromUserInput, false);
|
| - assert_equals(scrollState.shouldPropagate, true);
|
| -}, "Constructor behaves correctly.");
|
| +if ('ScrollState' in window) {
|
| + test(function() {
|
| + var scrollState = new ScrollState();
|
| + assert_equals(scrollState.deltaX, 0);
|
| + assert_equals(scrollState.deltaY, 0);
|
| + assert_equals(scrollState.deltaGranularity, 0);
|
| + assert_equals(scrollState.velocityX, 0);
|
| + assert_equals(scrollState.velocityY, 0);
|
| + assert_equals(scrollState.inInertialPhase, false);
|
| + assert_equals(scrollState.isBeginning, false);
|
| + assert_equals(scrollState.isEnding, false);
|
| + assert_equals(scrollState.fromUserInput, false);
|
| + assert_equals(scrollState.shouldPropagate, true);
|
| + }, "Empty constructor behaves correctly.");
|
|
|
| -test(function() {
|
| - var scrollState = new ScrollState();
|
| - scrollState.fromUserInput = true;
|
| - assert_equals(scrollState.fromUserInput, false);
|
| -}, "fromUserInput is read only");
|
| + test(function() {
|
| + var deltaX = 12.5;
|
| + var deltaY = 14.9;
|
| + var deltaGranularity = 148.3;
|
| + var velocityX = 23.7;
|
| + var velocityY = 2.5;
|
| + var inInertialPhase = true;
|
| + var isBeginning = true;
|
| + var isEnding = true;
|
| + var scrollState = new ScrollState(deltaX, deltaY, deltaGranularity, velocityX,
|
| + velocityY, inInertialPhase, isBeginning, isEnding);
|
| + assert_equals(scrollState.deltaX, deltaX);
|
| + assert_equals(scrollState.deltaY, deltaY);
|
| + assert_equals(scrollState.deltaGranularity, deltaGranularity);
|
| + assert_equals(scrollState.velocityX, velocityX);
|
| + assert_equals(scrollState.velocityY, velocityY);
|
| + assert_equals(scrollState.inInertialPhase, inInertialPhase);
|
| + assert_equals(scrollState.isBeginning, isBeginning);
|
| + assert_equals(scrollState.isEnding, isEnding);
|
| + assert_equals(scrollState.fromUserInput, false);
|
| + assert_equals(scrollState.shouldPropagate, true);
|
| + }, "Constructor behaves correctly.");
|
| +
|
| + test(function() {
|
| + var scrollState = new ScrollState();
|
| + scrollState.fromUserInput = true;
|
| + assert_equals(scrollState.fromUserInput, false);
|
| + }, "fromUserInput is read only");
|
| +}
|
| </script>
|
| </body>
|
| </html>
|
|
|