OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
2 <html> | |
3 <head> | |
4 <script src="../../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <p id="description"></p> | |
8 <div id="console"></div> | |
9 <script> | |
10 description('Check that a select control does not produce a form value if the se
lected option element is disabled.'); | |
11 | |
12 var parent = document.createElement('div'); | |
13 document.body.appendChild(parent); | |
14 parent.innerHTML = '<form action="">' | |
15 + '<input type=hidden name="submitted" value="true">' | |
16 + '<select name="select">' | |
17 + '<option disabled>Disabled</option>' | |
18 + '<option>Enabled</option>' | |
19 + '</select>' | |
20 + '</form>'; | |
21 | |
22 if (window.testRunner) | |
23 testRunner.waitUntilDone(); | |
24 var query = window.location.search; | |
25 if (query.indexOf('submitted=true') == -1) { | |
26 var select = document.getElementsByTagName('select')[0]; | |
27 select.selectedIndex = 0; | |
28 document.forms[0].submit(); | |
29 } else { | |
30 shouldBe('query.indexOf("select=Disabled")', '-1'); | |
31 shouldBe('query.indexOf("select=Enabled")', '-1'); | |
32 if (window.testRunner) | |
33 testRunner.notifyDone(); | |
34 } | |
35 </script> | |
36 </body> | |
37 </html> | |
OLD | NEW |