summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/select/HTMLOptionElement_selected3.html
blob: d6723e65b2f6d9d74f28e6b4271fa6d8062263ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
  <body>
    <p>This test checks the behavior of selected/selectedIndex properties prior to the &lt;/select&gt; being parsed. https://bugs.webkit.org/show_bug.cgi?id=32641</p>
    <p>Before querying selectedIndex, [theOption].selected = <span id="logOne"></span></p>
    <p>[theSelect].selectedIndex = <span id="logTwo"></span></p>
    <p>After querying selectedIndex, [theOption].selected = <span id="logThree"></span></p>
    <select id="theSelect" style="display:none">
      <option id="theOption">lalala</option>
    <script>
      if (window.testRunner)
        testRunner.dumpAsText();
      var o = document.getElementById('theOption');
      document.getElementById('logOne').textContent = o.selected;
      document.getElementById('logTwo').textContent = document.getElementById('theSelect').selectedIndex;
      document.getElementById('logThree').textContent = o.selected;
    </script>
    </select>
 </body>
</html>