2 <script src=
"../../resources/js-test.js"></script>
7 outline: solid
1px red;
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;">
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);