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

Unified Diff: LayoutTests/fast/dom/Element/scrollTop-scrollLeft-setters.html

Issue 782793002: Update Element API for CSSOM smooth scrolling to match the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years 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/dom/Element/scrollTop-scrollLeft-setters.html
diff --git a/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-setters.html b/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-setters.html
deleted file mode 100644
index 2cbf8ddb4851229eaab05a8ba716a0af5117554e..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/dom/Element/scrollTop-scrollLeft-setters.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <script src="../../../resources/js-test.js"></script>
-</head>
-<body>
- <div id="container" style="overflow: scroll; height: 200px; width: 200px">
- <div style="height: 1000px; width: 1000px; border: 1px solid black;">
- This box should force the container div to have a scrollable area to test.
- </div>
- </div>
- <script type="text/javascript">
- if (window.testRunner)
- testRunner.dumpAsText();
-
- var element = document.getElementById("container");
-
- description("This test makes sure setting scrollLeft or scrollTop to\
- an invalid value throws an exception.");
-
- // scrollLeft /////////////////////////
- debug('');
- debug('scrollLeft Tests');
- debug('');
-
- debug("Testing - setting scrollLeft to a valid value");
- shouldNotThrow('element.scrollLeft = 32');
- shouldNotThrow('element.scrollLeft = 32.1');
- shouldNotThrow('element.scrollLeft = "string"');
- shouldNotThrow('element.scrollLeft = null');
- shouldNotThrow('element.scrollLeft = undefined');
- shouldNotThrow('element.scrollLeft = Infinity');
- shouldNotThrow('element.scrollLeft = NaN');
- shouldNotThrow('element.scrollLeft = { x: 42 }');
- shouldNotThrow('element.scrollLeft = { x: 42, behavior: "auto" }');
- shouldNotThrow('element.scrollLeft = { x: 42, behavior: "instant" }');
- shouldNotThrow('element.scrollLeft = { x: 42, behavior: "smooth" }');
-
- debug("Testing - setting scrollLeft to an invalid value");
- shouldThrow('element.scrollLeft = { }');
- shouldThrow('element.scrollLeft = { x: 42, behavior: "" }');
- shouldThrow('element.scrollLeft = { x: 42, behavior: "abcd" }');
- shouldThrow('element.scrollLeft = { behavior: "abcd" }');
- shouldThrow('element.scrollLeft = { behavior: "smooth" }');
- shouldThrow('element.scrollLeft = { behavior: "instant" }');
- shouldThrow('element.scrollLeft = { behavior: "smooth" }');
-
- // scrollTop /////////////////////////
- debug('');
- debug('scrollTop Tests');
- debug('');
-
- debug("Testing - setting scrollTop to a valid value");
- shouldNotThrow('element.scrollTop = 32');
- shouldNotThrow('element.scrollTop = 32.1');
- shouldNotThrow('element.scrollTop = "string"');
- shouldNotThrow('element.scrollTop = null');
- shouldNotThrow('element.scrollTop = undefined');
- shouldNotThrow('element.scrollTop = Infinity');
- shouldNotThrow('element.scrollTop = NaN');
- shouldNotThrow('element.scrollTop = { y: 42 }');
- shouldNotThrow('element.scrollTop = { y: 42, behavior: "auto" }');
- shouldNotThrow('element.scrollTop = { y: 42, behavior: "instant" }');
- shouldNotThrow('element.scrollTop = { y: 42, behavior: "smooth" }');
-
- debug("Testing - setting scrollTop to an invalid value");
- shouldThrow('element.scrollTop = { }');
- shouldThrow('element.scrollTop = { y: 42, behavior: "" }');
- shouldThrow('element.scrollTop = { y: 42, behavior: "abcd" }');
- shouldThrow('element.scrollTop = { behavior: "abcd" }');
- shouldThrow('element.scrollTop = { behavior: "smooth" }');
- shouldThrow('element.scrollTop = { behavior: "instant" }');
- shouldThrow('element.scrollTop = { behavior: "smooth" }');
- </script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698