tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / forms / validation-message-on-listbox.html
1 <!DOCTYPE html>
2 <head>
3 <script src="../js/resources/js-test-pre.js"></script>
4 <script src="resources/common.js"></script>
5 </head>
6 <body>
7 <p>Check if the position of a validation message for a listbox is good.</p>
8
9 <form action="validation-message-on-listbox.html">
10 <select id=host name=select multiple required>
11 <option>One
12 <option>Two
13 </select>
14 <input type=submit id=submit>
15 </form>
16
17 <div id="console"></div>
18 <script>
19 function check() {
20     hostRect = getAbsoluteRect(host);
21     bubbleRect = getAbsoluteRect(getValidationMessageBubbleNode(host));
22     debug('The top of the bubble should be on the bottom of the host node:');
23     shouldBe('bubbleRect.top', 'hostRect.bottom');
24     debug('');
25
26     finishJSTest();
27 }
28
29 var host = $('host');
30 var hostRect;
31 var bubbleRect;
32 $('submit').click();
33 if (window.layoutTestController) {
34     setTimeout(check, 0);
35 } else {
36     debug('The test requires layoutTestController.');
37 }
38
39 var jsTestIsAsync = true;
40 </script>
41 <script src="../js/resources/js-test-post.js"></script>
42 </body>
43