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

Unified Diff: LayoutTests/fast/scroll-behavior/listbox-interrupted-scroll.html

Issue 400763003: Revert of Scroll interruption tests for CSSOM View smooth scroll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/listbox-interrupted-scroll.html
diff --git a/LayoutTests/fast/scroll-behavior/listbox-interrupted-scroll.html b/LayoutTests/fast/scroll-behavior/listbox-interrupted-scroll.html
deleted file mode 100644
index 360a86cce6293b432e9470112429e7953abeecd1..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/scroll-behavior/listbox-interrupted-scroll.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <script src="../../resources/testharness.js"></script>
- <script src="../../resources/testharnessreport.js"></script>
- <script src="resources/scroll-interruption-test.js"></script>
- <script type="text/javascript">
- const numItems = 500;
-
- function jsScroll(y) {
- document.getElementById('listbox').scrollTop = {y: y, behavior: 'smooth'};
- }
-
- function initializeContents(listbox) {
- for (var i = 0; i < numItems; i++) {
- var option = document.createElement('option');
- option.appendChild(document.createTextNode(i));
- listbox.appendChild(option);
- }
- }
-
- function initializeTest(indexTargets, targets, innerPoint, listbox) {
- var itemHeight = (listbox.scrollHeight - listbox.clientHeight) / (numItems - listbox.size);
-
- // Convert from listbox item index to scroll offset.
- targets.y_min = indexTargets.index_min * itemHeight;
- targets.y_mid = indexTargets.index_mid * itemHeight;
- targets.y_max = indexTargets.index_max * itemHeight;
-
- var boundingRect = listbox.getBoundingClientRect();
- innerPoint.x = (boundingRect.left + boundingRect.right)/2;
- innerPoint.y = (boundingRect.top + boundingRect.bottom)/2;
- }
-
- function doTest() {
- var indexTargets = {index_min: 3, index_mid: 200, index_max: 400};
- var targets = {};
- var innerPoint = {};
- var element = document.getElementById('listbox');
- initializeContents(element);
- initializeTest(indexTargets, targets, innerPoint, element);
- var scrollInterruptionTest = new SmoothScrollInterruptionTest(element,
- innerPoint,
- targets,
- jsScroll);
- scrollInterruptionTest.run();
- }
-
- window.addEventListener('load', doTest, false);
- </script>
-</head>
-
-<body>
- <p>Test that interrupting a smooth scroll on a listbox works with both scroll behaviors and with input</p>
- <select size="4" id="listbox"></select>
-</body>
-</html>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/scroll-behavior/listbox-interrupted-scroll-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698