Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/selected-index-value.html

Issue 1509853008: Move select/option/optgroup-related tests in fast/forms to fast/forms/select. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html >
2 <body>
3 <p>This tests that we can find the selected value of a dropdown when this format is used: [select_name][this.selectedIndex].value.
4 See bug 798404. </p>
5
6 <script>
7 if (window.testRunner)
8 testRunner.dumpAsText();
9
10 function test(selected_value) {
11 if (selected_value == 'C') {
12 document.getElementById("sourceViewDiv").innerHTML=' This test: PASSED!';
13 }
14 }
15 </script>
16
17 <form>
18
19 <select name="URL" onChange="javascript:test(URL[this.selectedIndex].value);" >
20 <option value="A">A</option>
21 <option value="B">B</option>
22 <option value="C">C</option>
23 </select>
24
25 <div id='sourceViewDiv'>This test: FAILED</div>
26
27 <script>
28 var x=document.getElementsByTagName('select')[0];
29 x.options[2].selected=true;
30 var evt = document.createEvent("HTMLEvents");
31 evt.initEvent("change", true, true);
32 x.dispatchEvent(evt);
33 </script>
34
35 </form>
36
37
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698