3 <p>This tests that a locally scoped variable in an event handler of a form
4 takes precedence over items of form.
7 <select onChange=
"var value = this.value;this.options[0].selected=true; if(value=='C') document.getElementById('sourceViewDiv').innerHTML='This test: PASSED!'">
8 <option value=
"A">A
</option>
9 <option value=
"B">B
</option>
10 <option value=
"C">C
</option>
13 <div id='sourceViewDiv'
>This test: FAILED
</div>
16 if (window
.testRunner
)
17 testRunner
.dumpAsText();
19 var x
=document
.getElementsByTagName('select')[0];
20 x
.options
[2].selected
=true;
21 var evt
= document
.createEvent("HTMLEvents");
22 evt
.initEvent("change", true, true);