OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <head> | 2 <head> |
3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <p>Test for a bug that RenderBlock crashed when a validation message bubble for
a select element with float:left was closing.</p> | 6 <p>Test for a bug that RenderBlock crashed when a validation message bubble for
a select element with float:left was closing.</p> |
7 <div id=console></div> | 7 <div id=console></div> |
8 <form> | 8 <form> |
9 <select style="float:left" required> | 9 <select style="float:left" required> |
10 <option value="">Plese select</option> | 10 <option value="">Plese select</option> |
11 <option>Foo</option> | 11 <option>Foo</option> |
12 </select> | 12 </select> |
13 <input type=submit id=submit> | 13 <input type=submit id=submit> |
14 </form> | 14 </form> |
15 | 15 |
16 <script> | 16 <script> |
17 window.jsTestIsAsync = true; | 17 window.jsTestIsAsync = true; |
18 | 18 |
19 function closeBubble() { | 19 function closeBubble() { |
20 // Make the <select> valid to close the validation message bubble. | 20 // Make the <select> valid to close the validation message bubble. |
21 document.getElementsByTagName('select')[0].selectedIndex = 1; | 21 document.getElementsByTagName('select')[0].selectedIndex = 1; |
22 setTimeout(finish, 0); | 22 setTimeout(finish, 0); |
23 } | 23 } |
24 function finish() { | 24 function finish() { |
25 testPassed('Not crashed.'); | 25 testPassed('Not crashed.'); |
26 finishJSTest(); | 26 finishJSTest(); |
27 } | 27 } |
28 | 28 |
29 document.getElementById('submit').click(); | 29 document.getElementById('submit').click(); |
30 setTimeout(closeBubble, 0); | 30 setTimeout(closeBubble, 0); |
31 </script> | 31 </script> |
32 </body> | 32 </body> |
OLD | NEW |