Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas-throw.html

Issue 1236913004: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add to leak expectations. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 d3494c44ae5f2acef89ea01713ccbac18673b174..5345dde11a23279992cf95b53e79927075b08dd8 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,11 +8,9 @@
<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() {
+ assert_true('ScrollState' in window, "'ScrollState' in window");
+}, "These tests only work with scroll customization enabled.");
function testConsumingDelta(dx, dy, consume_x, consume_y, testName, expectedError) {
test(function() {
@@ -25,17 +23,19 @@ function testConsumingDelta(dx, dy, consume_x, consume_y, testName, expectedErro
}, testName);
}
-// 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");
+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 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>

Powered by Google App Engine
This is Rietveld 408576698