blob: 4dd203f541a34f7359cf52c4affb36e629db0609 [file] [log] [blame]
<body onload="test()">
<p>This tests that clicking on a scrollbar in a frame does not clear selections in the frame.</p>
<iframe id="fr" src="resources/mousedown-in-subframe-scrollbar.html"></iframe>
<div id="results"></div>
</body>
<script>
function test() {
if (window.testRunner)
testRunner.dumpAsText();
var iframe = document.getElementById("fr");
iframe.contentWindow.focusAndSelectText();
if (window.eventSender) {
var x = iframe.offsetLeft + iframe.offsetWidth;
var y = iframe.offsetTop;
eventSender.mouseMoveTo(x - 5, y + 5);
eventSender.mouseDown();
eventSender.mouseMoveTo(x - 5, y + 20);
eventSender.mouseUp();
}
document.getElementById("results").innerText = "Selection: " +
iframe.contentWindow.getSelection();
}
</script>