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

Side by Side Diff: LayoutTests/fast/scrolling/scrolling-apis-nan-scroll-position.html

Issue 670833002: Early out if the scroll position passed in by js is NaN (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/scrolling/scrolling-apis-nan-scroll-position-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <style>
3
4 body {
5 height: 30000px;
6 width: 30000px;
7 }
8
9 .spacer {
10 height: 1000px;
11 width: 1000px;
12 }
13
14 #scroller {
15 height: 100px;
16 width: 100px;
17 overflow: scroll;
18 }
19 </style>
20
21 <div id=scroller>
22 <div class=spacer></div>
23 </div>
24
25 <script src="../../resources/js-test.js"></script>
26 <script>
27 description("Verifies that nan scroll position works correctly.");
28
29 function scroll()
30 {
31 window.scrollTo(1, 1);
32 shouldBe('window.scrollY', "1");
33 shouldBe('window.scrollX', "1");
34
35 window.scrollTo(window.NaN, window.NaN);
36 shouldBe('window.scrollY', "1");
37 shouldBe('window.scrollX', "1");
38
39 window.scrollBy(window.NaN, window.NaN);
40 shouldBe('window.scrollY', "1");
41 shouldBe('window.scrollX', "1");
42
43 scroller.scrollTop = 1;
44 shouldBe("scroller.scrollTop", "1");
45 scroller.scrollTop = window.NaN;
46 shouldBe("scroller.scrollTop", "1");
47
48 scroller.scrollLeft = 1;
49 shouldBe("scroller.scrollLeft", "1");
50 scroller.scrollLeft = window.NaN;
51 shouldBe("scroller.scrollLeft", "1");
52 }
53
54 onload = function() {
55 if (window.eventSender)
56 scroll();
57 }
58
59 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/scrolling/scrolling-apis-nan-scroll-position-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698