| <script src="../../resources/js-test-pre.js"></script> |
| <script src="resources/common.js"></script> |
| <p>Check if the position of a validation message for a checkbox is good.</p> |
| <form action="validation-message-on-checkbox.html"> |
| <input type=checkbox id=host required> |
| <input type=submit id=submit> |
| 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('The left position of the bubble should be 0 because of no enough space:'); |
| shouldBeTrue('hostRect.left + hostRect.width / 2 < 32'); |
| shouldBe('bubbleRect.left', '0'); |
| debug('The test requires testRunner.'); |
| var jsTestIsAsync = true; |
| <script src="../../resources/js-test-post.js"></script> |