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

Unified Diff: LayoutTests/fast/dom/Window/window-scroll-arguments.html

Issue 59863003: window.scroll() without params should be ignored or throw an error (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase test & test results of non-numeric-values-numeric-parameters test. Created 7 years, 1 month 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 | LayoutTests/fast/dom/Window/window-scroll-arguments-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22d0ef6c6e1c213315126b5a5bae9b79d68ffa74..ccf125a1199932de68a506c00992f41d89ca24d0 100644
--- a/LayoutTests/fast/dom/Window/window-scroll-arguments.html
+++ b/LayoutTests/fast/dom/Window/window-scroll-arguments.html
@@ -25,7 +25,7 @@
reset();
description("This test makes sure that calling the window scrolling\
- methods with less than 2 arguments treats the missing arguments as 0.");
+ methods with less than 2 arguments throws exception.");
// scrollTo /////////////////////////
debug('');
@@ -33,15 +33,11 @@
debug('');
debug("Testing - scrollTo with 0 arguments");
- window.scrollTo();
- shouldBe('window.scrollX', 'resetX');
- shouldBe('window.scrollY', 'resetY');
+ shouldThrow('window.scrollTo()');
reset();
debug("Testing - scrollTo with 1 argument");
- window.scrollTo(x);
- shouldBe('window.scrollX', 'resetX + x');
- shouldBe('window.scrollY', 'resetY');
+ shouldThrow('window.scrollTo(x)');;
reset();
debug("Testing - scrollTo with more than 2 arguments");
@@ -56,15 +52,11 @@
debug('');
debug("Testing - scroll with 0 arguments");
- window.scroll();
- shouldBe('window.scrollX', 'resetX');
- shouldBe('window.scrollY', 'resetY');
+ shouldThrow('window.scroll()');;
reset();
debug("Testing - scroll with 1 argument");
- window.scroll(x);
- shouldBe('window.scrollX', 'resetX + x');
- shouldBe('window.scrollY', 'resetY');
+ shouldThrow('window.scroll(x)');
reset();
debug("Testing - scroll with more than 2 arguments");
@@ -79,15 +71,11 @@
debug('');
debug("Testing - scrollBy with 0 arguments");
- window.scrollBy();
- shouldBe('window.scrollX', 'resetX');
- shouldBe('window.scrollY', 'resetY');
+ shouldThrow('window.scrollBy()');;
reset();
debug("Testing - scrollBy with 1 argument");
- window.scrollBy(x);
- shouldBe('window.scrollX', 'resetX + x');
- shouldBe('window.scrollY', 'resetY');
+ shouldThrow('window.scrollBy(x)');
reset();
debug("Testing - scrollBy with more than 2 arguments");
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/window-scroll-arguments-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698