| <!DOCTYPE HTML> |
| <html> |
| <head> |
| <title>Forms</title> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <p> |
| <h3>input_list</h3> |
| </p> |
| <li>List is showed list when click the input control.</li> |
| <hr> |
| |
| <div id="log"></div> |
| |
| <form method="post" |
| enctype="application/x-www-form-urlencoded" |
| action="" |
| name="input_form"> |
| <p><input type='text' id='input_url' list="urls"></p> |
| <datalist id="urls"> |
| <option value="http://www.google.com/" label="Google"> |
| <option value="http://www.reddit.com/" label="Reddit"> |
| </datalist> |
| </form> |
| |
| <script> |
| |
| var input_url = document.getElementById("input_url"); |
| var ele = input_url.list; |
| |
| if (typeof(ele) != "object") { |
| if (typeof(ele) == "null") { |
| test(function() { |
| assert_unreached("list attribute is not correct."); |
| }); |
| } else { |
| test(function() { |
| assert_unreached("list attribute is not exist."); |
| }); |
| } |
| } |
| </script> |
| |
| </body> |
| </html> |