| This test makes sure that calling the window scrolling methods with a single non-dictionary argument or with a dictionary whose 'behavior' field is invalid throws an exception. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| |
| window.scrollTo Tests |
| |
| |
| Testing - scrollTo with 0 arguments |
| PASS window.scrollTo() did not throw exception. |
| Testing - scrollTo with 1 non-dictionary argument |
| PASS window.scrollTo(x) threw exception TypeError: Failed to execute 'scrollTo' on 'Window': cannot convert to dictionary.. |
| Testing - scrollTo with a valid ScrollToOptions argument |
| PASS window.scrollTo({ }) did not throw exception. |
| PASS window.scrollTo({ left: x }) did not throw exception. |
| PASS window.scrollTo({ top: y }) did not throw exception. |
| PASS window.scrollTo({ behavior: "auto" }) did not throw exception. |
| PASS window.scrollTo({ behavior: "instant" }) did not throw exception. |
| PASS window.scrollTo({ behavior: "smooth" }) did not throw exception. |
| PASS window.scrollTo({ left: x, top: y }) did not throw exception. |
| PASS window.scrollTo({ left: x, top: y, behavior: "auto" }) did not throw exception. |
| PASS window.scrollTo({ left: x, top: y, behavior: "instant" }) did not throw exception. |
| PASS window.scrollTo({ left: x, top: y, behavior: "smooth" }) did not throw exception. |
| Testing - scrollTo with an invalid ScrollToOptions argument |
| PASS window.scrollTo({ behavior: "" }) threw exception TypeError: Failed to execute 'scrollTo' on 'Window': The provided value '' is not a valid enum value of type ScrollBehavior.. |
| PASS window.scrollTo({ left: x, top: y, behavior: "abcd" }) threw exception TypeError: Failed to execute 'scrollTo' on 'Window': The provided value 'abcd' is not a valid enum value of type ScrollBehavior.. |
| PASS window.scrollTo({ left: x, top: y, behavior: 200 }) threw exception TypeError: Failed to execute 'scrollTo' on 'Window': The provided value '200' is not a valid enum value of type ScrollBehavior.. |
| |
| |
| window.scroll Tests |
| |
| |
| Testing - scroll with 0 arguments |
| PASS window.scroll() did not throw exception. |
| Testing - scroll with 1 argument |
| PASS window.scroll(x) threw exception TypeError: Failed to execute 'scroll' on 'Window': cannot convert to dictionary.. |
| Testing - scroll with a valid ScrollToOptions argument |
| PASS window.scroll({ }) did not throw exception. |
| PASS window.scroll({ left: x }) did not throw exception. |
| PASS window.scroll({ top: y }) did not throw exception. |
| PASS window.scroll({ behavior: "auto" }) did not throw exception. |
| PASS window.scroll({ behavior: "instant" }) did not throw exception. |
| PASS window.scroll({ behavior: "smooth" }) did not throw exception. |
| PASS window.scroll({ left: x, top: y }) did not throw exception. |
| PASS window.scroll({ left: x, top: y, behavior: "auto" }) did not throw exception. |
| PASS window.scroll({ left: x, top: y, behavior: "instant" }) did not throw exception. |
| PASS window.scroll({ left: x, top: y, behavior: "smooth" }) did not throw exception. |
| Testing - scroll with an invalid ScrollToOptions argument |
| PASS window.scroll({ behavior: "" }) threw exception TypeError: Failed to execute 'scroll' on 'Window': The provided value '' is not a valid enum value of type ScrollBehavior.. |
| PASS window.scroll({ left: x, top: y, behavior: "abcd" }) threw exception TypeError: Failed to execute 'scroll' on 'Window': The provided value 'abcd' is not a valid enum value of type ScrollBehavior.. |
| PASS window.scroll({ left: x, top: y, behavior: 200 }) threw exception TypeError: Failed to execute 'scroll' on 'Window': The provided value '200' is not a valid enum value of type ScrollBehavior.. |
| |
| |
| window.scrollBy Tests |
| |
| |
| Testing - scrollBy with 0 arguments |
| PASS window.scrollBy() did not throw exception. |
| Testing - scrollBy with 1 argument |
| PASS window.scrollBy(x) threw exception TypeError: Failed to execute 'scrollBy' on 'Window': cannot convert to dictionary.. |
| Testing - scrollBy with a valid ScrollOptions argument |
| PASS window.scrollBy({ }) did not throw exception. |
| PASS window.scrollBy({ left: x }) did not throw exception. |
| PASS window.scrollBy({ top: y }) did not throw exception. |
| PASS window.scrollBy({ behavior: "auto" }) did not throw exception. |
| PASS window.scrollBy({ behavior: "instant" }) did not throw exception. |
| PASS window.scrollBy({ behavior: "smooth" }) did not throw exception. |
| PASS window.scrollBy({ left: x, top: y }) did not throw exception. |
| PASS window.scrollBy({ left: x, top: y, behavior: "auto" }) did not throw exception. |
| PASS window.scrollBy({ left: x, top: y, behavior: "instant" }) did not throw exception. |
| PASS window.scrollBy({ left: x, top: y, behavior: "smooth" }) did not throw exception. |
| Testing - scrollBy with an invalid ScrollOptions argument |
| PASS window.scrollBy({ behavior: "" }) threw exception TypeError: Failed to execute 'scrollBy' on 'Window': The provided value '' is not a valid enum value of type ScrollBehavior.. |
| PASS window.scrollBy({ left: x, top: y, behavior: "abcd" }) threw exception TypeError: Failed to execute 'scrollBy' on 'Window': The provided value 'abcd' is not a valid enum value of type ScrollBehavior.. |
| PASS window.scrollBy({ left: x, top: y, behavior: 200 }) threw exception TypeError: Failed to execute 'scrollBy' on 'Window': The provided value '200' is not a valid enum value of type ScrollBehavior.. |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |
| This box should force the window to have a scrollable area to test. |