| Index: LayoutTests/fast/dom/Window/window-scroll-arguments.html
|
| diff --git a/LayoutTests/fast/dom/Window/window-scroll-arguments.html b/LayoutTests/fast/dom/Window/window-scroll-arguments.html
|
| index 26855c37975409c0081953fa5ffbbb7ceaa4e3da..d2c9b253e38bdde1e744f21d29370482c4170494 100644
|
| --- a/LayoutTests/fast/dom/Window/window-scroll-arguments.html
|
| +++ b/LayoutTests/fast/dom/Window/window-scroll-arguments.html
|
| @@ -25,7 +25,8 @@
|
| reset();
|
|
|
| description("This test makes sure that calling the window scrolling\
|
| - methods with less than 2 arguments throws exception.");
|
| + methods with less than 2 arguments or with an invalid third argument\
|
| + throws an exception.");
|
|
|
| // scrollTo /////////////////////////
|
| debug('');
|
| @@ -46,6 +47,16 @@
|
| shouldBe('window.scrollY', 'y');
|
| reset();
|
|
|
| + debug("Testing - scrollTo with a valid ScrollOptions argument");
|
| + shouldNotThrow('window.scrollTo(x, y, { })');
|
| + shouldNotThrow('window.scrollTo(x, y, { behavior: "auto" })');
|
| + shouldNotThrow('window.scrollTo(x, y, { behavior: "instant" })');
|
| + shouldNotThrow('window.scrollTo(x, y, { behavior: "smooth" })');
|
| +
|
| + debug("Testing - scrollTo with an invalid ScrollOptions argument");
|
| + shouldThrow('window.scrollTo(x, y, { behavior: "" })');
|
| + shouldThrow('window.scrollTo(x, y, { behavior: "abcd" })');
|
| +
|
| // scroll /////////////////////////
|
| debug('');
|
| debug('window.scroll Tests');
|
| @@ -65,6 +76,16 @@
|
| shouldBe('window.scrollY', 'y');
|
| reset();
|
|
|
| + debug("Testing - scroll with a valid ScrollOptions argument");
|
| + shouldNotThrow('window.scroll(x, y, { })');
|
| + shouldNotThrow('window.scroll(x, y, { behavior: "auto" })');
|
| + shouldNotThrow('window.scroll(x, y, { behavior: "instant" })');
|
| + shouldNotThrow('window.scroll(x, y, { behavior: "smooth" })');
|
| +
|
| + debug("Testing - scroll with an invalid ScrollOptions argument");
|
| + shouldThrow('window.scroll(x, y, { behavior: "" })');
|
| + shouldThrow('window.scroll(x, y, { behavior: "abcd" })');
|
| +
|
| // scrollBy /////////////////////////
|
| debug('');
|
| debug('window.scrollBy Tests');
|
| @@ -83,6 +104,16 @@
|
| shouldBe('window.scrollX', 'resetX + x');
|
| shouldBe('window.scrollY', 'resetY + y');
|
| reset();
|
| +
|
| + debug("Testing - scrollBy with a valid ScrollOptions argument");
|
| + shouldNotThrow('window.scrollBy(x, y, { })');
|
| + shouldNotThrow('window.scrollBy(x, y, { behavior: "auto" })');
|
| + shouldNotThrow('window.scrollBy(x, y, { behavior: "instant" })');
|
| + shouldNotThrow('window.scrollBy(x, y, { behavior: "smooth" })');
|
| +
|
| + debug("Testing - scrollBy with an invalid ScrollOptions argument");
|
| + shouldThrow('window.scrollBy(x, y, { behavior: "" })');
|
| + shouldThrow('window.scrollBy(x, y, { behavior: "abcd" })');
|
| </script>
|
| </body>
|
| </html>
|
|
|