1 description('Check that a select control does not produce a form value if the selected option element is disabled.');
3 var parent = document.createElement('div');
4 document.body.appendChild(parent);
5 parent.innerHTML = '<form action="">'
6 + '<input type=hidden name="submitted" value="true">'
7 + '<select name="select">'
8 + '<option disabled>Disabled</option>'
9 + '<option>Enabled</option>'
13 if (window.layoutTestController)
14 layoutTestController.waitUntilDone();
15 var query = window.location.search;
16 if (query.indexOf('submitted=true') == -1) {
17 var select = document.getElementsByTagName('select')[0];
18 select.selectedIndex = 0;
19 document.forms[0].submit();
21 shouldBe('query.indexOf("select=Disabled")', '-1');
22 shouldBe('query.indexOf("select=Enabled")', '-1');
23 if (window.layoutTestController)
24 layoutTestController.notifyDone();