4 <style type=
"text/css">
17 <body onload=
"test()">
18 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=20184">bug
20184</a>:
19 SELECT with no name generates invalid query string.
</p>
21 <select><option disabled
>invalid
</option></select>
22 <select><option disabled
></option></select>
24 <input type='hidden'
id=
"done" name=
"done" value=
"true"/>
25 <input type=
"hidden" id=
"id" name=
"id" value=
"123"/>
27 <h2 id=
"pass">PASS
</h2>
28 <h2 id=
"fail">FAIL
</h2>
29 <script type=
"text/javascript">
30 if (window
.testRunner
) {
31 testRunner
.waitUntilDone();
32 testRunner
.dumpAsText();
36 var id
= document
.getElementById('id');
38 // Options with "disabled" or "invalid" value
39 // are are failures here.
40 if(location
.search
&& /invalid|disabled/.test(location
.search
)) {
41 document
.getElementById("fail").style
.display
= "inline-block";
44 var m
= location
.search
.match(/id=(\d+)/);
50 } else id
.disabled
= true;
52 if(!/done=true/.test(location
.search
)) {
53 document
.forms
[0].submit();
56 document
.getElementById("pass").style
.display
= "inline-block";
58 if (window
.testRunner
)
59 testRunner
.notifyDone();
63 <a href=
"javascript:history.back();">reload
</a>