chromium/third_party/blink/web_tests/editing/selection/focus_editable_html_element_scroll.html

<!doctype html>
<html contenteditable>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<html contenteditable>
<body style="overflow:hidden;">
This test makes sure that we don't scroll unnecessarily to reveal an editable HTML Element.
<br> If the document doesn't scroll, test passes.<br>
<b>This demonstrates a bug: normally, focusing an element will select its contents.</b>
<div style="width:2000px;height:2000px;"></div>
If the document scrolls here, test fails.
<div id="log"></div>
</body>
</html>
<script>
var test = async_test('focus to editable should not scroll');
document.documentElement.addEventListener('focus', function() {
    assert_equals(document.body.scrollTop, 0);
    test.done();
});
test.step(function() {
    document.documentElement.focus();
});
</script>