Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / scroll-behavior / bordered-container-child-scroll.html
blobdf2442556a48772a0497f11c3e3c2ab88a68b959
1 <!DOCTYPE HTML>
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 td {
5 width: 48px;
6 height: 48px;
7 outline: solid 1px red;
9 </style>
10 <div id="parent" style="width: 65px; height: 65px; border: solid 5px black; overflow: scroll;">
11 <table id="Grid" style="width: 150px; border-collapse: collapse;">
12 <tr>
13 <td></td>
14 <td></td>
15 </tr>
16 <tr>
17 <td></td>
18 <td></td>
19 </tr>
20 <tr>
21 <td></td>
22 <td></td>
23 <td></td>
24 </tr>
25 </table>
26 </div>
27 <script>
28 description('Issue crbug.com/295848: element.scrollIntoViewIfNeeded() does not scroll the entire element render box into view.');
29 if (window.testRunner)
30 testRunner.dumpAsText(true);
32 var parent = document.getElementById("parent");
33 var table = document.getElementById("Grid");
35 table.rows[1].cells[1].scrollIntoViewIfNeeded(false);
36 shouldBeEqualToNumber('parent.scrollTop', 50);
37 shouldBeEqualToNumber('parent.scrollLeft', 50);
39 table.rows[0].cells[0].scrollIntoViewIfNeeded(false);
40 shouldBeEqualToNumber('parent.scrollTop', 0);
41 shouldBeEqualToNumber('parent.scrollLeft', 0);
42 </script>