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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/scroll-into-view/check-scroll-position.html

Issue 2911103002: Revert of Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/scroll-into-view/check-scroll-position.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/scroll-into-view/check-scroll-position.html b/third_party/WebKit/LayoutTests/external/wpt/scroll-into-view/check-scroll-position.html
deleted file mode 100644
index 200491a5b7204685dc845bba884516bd3bd4c49e..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/external/wpt/scroll-into-view/check-scroll-position.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE HTML>
-<script src='/resources/testharness.js'></script>
-<script src='/resources/testharnessreport.js'></script>
-<title> Check End Position of ScrollIntoView</title>
-<div id='container' style='height: 2500px; width: 2500px;'>
- <div id='content' style='height: 500px; width: 500px;margin-left: 1000px; margin-right: 1000px; margin-top: 1000px;margin-bottom: 1000px'>
- </div>
-</div>
-<script>
-
-var frames = 0;
-var content_height = 500;
-var content_width = 500;
-var window_height = document.documentElement.clientHeight;
-var window_width = document.documentElement.clientWidth;
-var content = document.getElementById('content');
-
-function animate (funct, x, y, next) {
- if (frames < 500) {
- ++frames;
- requestAnimationFrame(animate.bind(null, funct, x, y, next));
- } else {
- funct.step(function() {
- assert_approx_equals(window.scrollX, x, 1);
- assert_approx_equals(window.scrollY, y, 1);
- funct.done();
- if (next)
- next();
- });
- }
-}
-
-var checkNearest = async_test("Smooth ScrollIntoView should scroll the element to the 'nearest' position");
-checkNearest.step(function() {
- content.scrollIntoView(
- {behavior: 'smooth', block: 'nearest', inlinePosition: 'nearest'});
- frames = 0;
- var x = content.offsetLeft + content_width - window_width;
- var y = content.offsetTop + content_height - window_height;
- animate(checkNearest, x, y, test2);
-});
-
-var checkStart = async_test("Smooth ScrollIntoView should scroll the element to the 'start' position");
-function test2() {
- checkStart.step(function() {
- content.scrollIntoView(
- {behavior: 'smooth', block: 'start', inlinePosition: 'start'});
- frames = 0;
- animate(checkStart, content.offsetLeft, content.offsetTop, test3);
- });
-}
-
-var checkCenter = async_test("Smooth ScrollIntoView should scroll the element to the 'center' position");
-function test3() {
- checkCenter.step(function() {
- content.scrollIntoView(
- {behavior: 'smooth', block: 'center', inlinePosition: 'center'});
- frames = 0;
- var x = content.offsetLeft + (content_width - window_width) / 2;
- var y = content.offsetTop + (content_height - window_height) / 2;
- animate(checkCenter, x, y, test4);
- });
-}
-
-var checkEnd = async_test("Smooth ScrollIntoView should scroll the element to the 'end' position");
-function test4() {
- checkEnd.step(function() {
- content.scrollIntoView(
- {behavior: 'smooth', block: 'end', inlinePosition: 'end'});
- frames = 0;
- var x = content.offsetLeft + content_width - window_width;
- var y = content.offsetTop + content_height - window_height;
- animate(checkEnd, x, y, null);
- });
-}
-
-</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698