<!doctype html>
<style>
body { overflow:hidden; }
.editing {
border: solid red 50px;
font-size: 24px;
line-height: 48px;
padding: 24px;
margin: 64px;
width: 600px;
}
</style>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<body>
<div contenteditable class="editing">
<div id="sample">
Four score and seven years ago our fathers brought forth, upon this
continent, a new nation, conceived in Liberty, and dedicated to the
proposition that all men
<br>
are created equal. Now we are engaged in a
great civil war, testing whether that nation, or any nation, so
conceived, and so dedicated, can long endure. We are met here on a great
<br>
battlefield of that war. We have come to dedicate a portion of it as a
final resting place for those who here gave their lives that that nation
might live. It is altogether fitting and proper that we should do this.
<br>
Four score and seven years ago our fathers brought forth, upon this
continent, a new nation, conceived in Liberty, and dedicated to the
proposition that all men are created equal.
</div>
</div>
<div id="log"></div>
</body>
<script>
test(function() {
var selection = window.getSelection();
var sample = document.getElementById('sample');
selection.collapse(sample, 0);
document.execCommand('selectAll');
assert_equals(selection.anchorNode, sample.firstChild, 'anchorNode');
assert_equals(selection.anchorOffset, 1, 'anchorOffset');
assert_equals(selection.focusNode, sample.childNodes[6], 'focusNode');
assert_equals(selection.focusOffset, 180, 'focusOffset');
}, 'overflow:hidden does not affect select-ability');
</script>