blob: d4b3e9df0da8ac9cc9a9607e14d5a658c5f6fcd6 [file] [log] [blame]
<!DOCTYPE html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/common.js"></script>
</head>
<body>
<p>Check if the position of a validation message for a listbox is good.</p>
<form action="validation-message-on-listbox.html">
<select id=host name=select multiple required>
<option>One
<option>Two
</select>
<input type=submit id=submit>
</form>
<div id="console"></div>
<script>
function check() {
hostRect = getAbsoluteRect(host);
bubbleRect = getAbsoluteRect(getValidationMessageBubbleNode(host));
debug('The top of the bubble should be on the bottom of the host node:');
shouldBe('bubbleRect.top', 'hostRect.bottom');
debug('');
finishJSTest();
}
var host = $('host');
var hostRect;
var bubbleRect;
$('submit').click();
if (window.testRunner) {
setTimeout(check, 0);
} else {
debug('The test requires testRunner.');
}
var jsTestIsAsync = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>