blob: 63baca0c0fa3415553e641079c1d1311e7ad31d0 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<div id="group" style="overflow: scroll; width:100px; height:100px;">
test test test test <br>
test test test test <br>
test test test test <br>
test test test test <br>
test test test test <br>
test test test test <br>
test test test test <br>
test test test test <br>
test test test test <br>
<button id="button">button</button>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that the scrollToMakeVisible accessibility action works as expected on the Mac.");
if (window.accessibilityController) {
var button = accessibilityController.accessibleElementById("button");
var buttonX = button.x;
var buttonY = button.y;
button.scrollToMakeVisible();
var newButtonX = button.x;
var newButtonY = button.y;
debug("Scroll to make visible is performed. The X position should be the same, but the Y position should have changed.");
shouldBeTrue("newButtonX == buttonX");
shouldBeTrue("newButtonY > buttonY");
document.getElementById("group").style.visibility = "hidden";
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>