| Index: LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html
|
| diff --git a/LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html b/LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..df2442556a48772a0497f11c3e3c2ab88a68b959
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html
|
| @@ -0,0 +1,42 @@
|
| +<!DOCTYPE HTML>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<style>
|
| + td {
|
| + width: 48px;
|
| + height: 48px;
|
| + outline: solid 1px red;
|
| + }
|
| +</style>
|
| +<div id="parent" style="width: 65px; height: 65px; border: solid 5px black; overflow: scroll;">
|
| + <table id="Grid" style="width: 150px; border-collapse: collapse;">
|
| + <tr>
|
| + <td></td>
|
| + <td></td>
|
| + </tr>
|
| + <tr>
|
| + <td></td>
|
| + <td></td>
|
| + </tr>
|
| + <tr>
|
| + <td></td>
|
| + <td></td>
|
| + <td></td>
|
| + </tr>
|
| + </table>
|
| +</div>
|
| +<script>
|
| + description('Issue crbug.com/295848: element.scrollIntoViewIfNeeded() does not scroll the entire element render box into view.');
|
| + if (window.testRunner)
|
| + testRunner.dumpAsText(true);
|
| +
|
| + var parent = document.getElementById("parent");
|
| + var table = document.getElementById("Grid");
|
| +
|
| + table.rows[1].cells[1].scrollIntoViewIfNeeded(false);
|
| + shouldBeEqualToNumber('parent.scrollTop', 50);
|
| + shouldBeEqualToNumber('parent.scrollLeft', 50);
|
| +
|
| + table.rows[0].cells[0].scrollIntoViewIfNeeded(false);
|
| + shouldBeEqualToNumber('parent.scrollTop', 0);
|
| + shouldBeEqualToNumber('parent.scrollLeft', 0);
|
| +</script>
|
|
|