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

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

Issue 1239993005: Revert of Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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.html
diff --git a/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas.html b/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas.html
index f37b597e89b3dc0ffa2dfa339d26f8ba18f95177..ec328003a093aec3ab6c97680eb0ffc6811ce9e5 100644
--- a/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas.html
+++ b/LayoutTests/fast/scroll-behavior/scroll-customization/scrollstate-consume-deltas.html
@@ -8,6 +8,12 @@
<body>
<script>
+if (!window.internals || !window.internals.runtimeFlags.scrollCustomizationEnabled) {
+ console.log("These tests only work with window.internals exposed, " +
+ "and require scroll customization.");
+ done();
+}
+
function deltaShouldBe(scrollState, x, y, testName) {
test(function() {
assert_equals(scrollState.deltaX, x);
@@ -15,18 +21,12 @@
}, testName);
}
-test(function() {
- assert_true('ScrollState' in window, "'ScrollState' in window");
-}, "These tests only work with scroll customization enabled.");
-
-if ('ScrollState' in window) {
- var scrollState = new ScrollState(10, -20);
- deltaShouldBe(scrollState, 10, -20, "Unconsumed deltas");
- scrollState.consumeDelta(2, -3);
- deltaShouldBe(scrollState, 8, -17, "Partially consumed deltas");
- scrollState.consumeDelta(8, -17);
- deltaShouldBe(scrollState, 0, 0, "Fully consumed deltas");
-}
+var scrollState = new ScrollState(10, -20);
+deltaShouldBe(scrollState, 10, -20, "Unconsumed deltas");
+scrollState.consumeDelta(2, -3);
+deltaShouldBe(scrollState, 8, -17, "Partially consumed deltas");
+scrollState.consumeDelta(8, -17);
+deltaShouldBe(scrollState, 0, 0, "Fully consumed deltas");
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698