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

Side by Side Diff: LayoutTests/fast/scrolling/scroll-max-value.html

Issue 400633005: Use LayoutUnit::fromFloatRound for setting scroll values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/scrolling/scroll-max-value-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 <html>
3 <head>
4 <style>
5 #test {
6 width: 300px;
7 height: 300px;
8 overflow: auto;
9 border: 1px solid silver;
10 }
11 #test > article {
12 width: 1000px;
13 height: 1000px;
14 position: relative;
15 }
16 #top-left {
17 position: absolute;
18 top: 0;
19 left: 0;
20 }
21 #bottom-right {
22 position: absolute;
23 bottom: 0;
24 right: 0;
25 }
26 </style>
27 <script src="../../resources/js-test.js"></script>
28 </head>
29 <body>
30 <section id="test">
31 <article>
32 <span id="top-left">top left</span>
33 <span id="bottom-right">bottom right</span>
34 </article>
35 </section>
36 <p>
37 Tests that large scrollLeft/Top values aren't being ignored.
38 </p>
39 <script>
40 var el = document.getElementById('test');
41 el.scrollLeft = 100000000;
42 el.scrollTop = 100000000;
43
44 var expectedScrollLeft = el.firstElementChild.offsetWidth -
45 el.clientWidth;
46 if (el.scrollLeft == expectedScrollLeft) {
47 testPassed('Setting el.scrollLeft = 100000000 scrolls all ' +
48 'the way to the right.');
49 } else {
50 testFailed('Setting el.scrollLeft = 100000000 scrolls to ' +
51 el.scrollLeft + ', expected ' + expectedScrollLeft + '.');
52 }
53
54 var expectedScrollTop = el.firstElementChild.offsetHeight -
55 el.clientHeight;
56 if (el.scrollTop == expectedScrollTop) {
57 testPassed('Setting el.scrollTop = 100000000 scrolls all ' +
58 'the way to the bottom.');
59 } else {
60 testFailed('Setting el.scrollTop = 100000000 scrolls to ' +
61 el.scrollTop + ', expected ' + expectedScrollTop + '.');
62 }
63 </script>
64 </body>
65 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/scrolling/scroll-max-value-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698