diff --git a/src/browser/tests/element/position.html b/src/browser/tests/element/position.html index 17568d68c..03011d772 100644 --- a/src/browser/tests/element/position.html +++ b/src/browser/tests/element/position.html @@ -337,17 +337,14 @@ testing.expectEqual(0, panel.clientHeight); testing.expectTrue(panel.scrollHeight > 0); - // The root containers keep their synthetic size rather than summing - // children. The root element's clientHeight is the viewport (CSSOM View): - // jstracker tiles clientWidth/10 cells over clientHeight and calls - // elementFromPoint per cell, which the 100M px box turned into ~5M walks. + // The root element's clientHeight is the viewport (CSSOM View); jstracker + // tiles it with elementFromPoint calls. testing.expectEqual(document.body.clientHeight, document.body.scrollHeight); testing.expectEqual(window.innerHeight, document.documentElement.clientHeight); testing.expectEqual( - document.documentElement.offsetHeight, + Math.max(document.documentElement.offsetHeight, document.documentElement.clientHeight), document.documentElement.scrollHeight, ); - testing.expectTrue(document.documentElement.scrollHeight > document.documentElement.clientHeight); } @@ -578,6 +575,11 @@ deep.id = 'deep'; document.body.appendChild(deep); + // Room to scroll it to the top + const room = document.createElement('div'); + room.style.height = '10000px'; + document.body.appendChild(room); + const targetY = deep.getBoundingClientRect().y; testing.expectTrue(targetY > 0); diff --git a/src/browser/tests/mcp_actions.html b/src/browser/tests/mcp_actions.html index c6e409ce5..50941d429 100644 --- a/src/browser/tests/mcp_actions.html +++ b/src/browser/tests/mcp_actions.html @@ -70,5 +70,7 @@ document.getElementById('rad').addEventListener('click', function() { window.radClicked = true; }); document.getElementById('rad').addEventListener('change', function() { window.radChanged = true; }); + +
diff --git a/src/browser/tests/window_scroll.html b/src/browser/tests/window_scroll.html index 6d16dc0c3..bc23bf61b 100644 --- a/src/browser/tests/window_scroll.html +++ b/src/browser/tests/window_scroll.html @@ -1,6 +1,9 @@ + +
+ @@ -45,6 +48,43 @@ testing.expectEqual(0, window.scrollY); + + + +