| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script> | |
| 5 window.enablePixelTesting = true; | |
| 6 </script> | |
| 7 <script src="../../../resources/js-test.js"></script> | |
| 8 <script src="../resources/picker-common.js"></script> | |
| 9 </head> | |
| 10 <body> | |
| 11 <style> | |
| 12 select { | |
| 13 padding-left: 20px; | |
| 14 background-color: #DDDDFF; | |
| 15 } | |
| 16 | |
| 17 option.styled { | |
| 18 font-style: italic; | |
| 19 font-variant: small-caps; | |
| 20 font-weight: bold; | |
| 21 font-family: cursive; | |
| 22 font-size: 24px; | |
| 23 background-color: green; | |
| 24 color: red; | |
| 25 } | |
| 26 </style> | |
| 27 <select id="menu"> | |
| 28 <option>foo</option> | |
| 29 <optgroup label="group" id="group"> | |
| 30 <option selected>bar</option> | |
| 31 </optgroup> | |
| 32 <option hidden>qux</option> | |
| 33 <option class="styled">baz</option> | |
| 34 </select> | |
| 35 <p id="description" style="opacity: 0"></p> | |
| 36 <div id="console" style="opacity: 0"></div> | |
| 37 <script> | |
| 38 var menu = document.getElementById('menu'); | |
| 39 menu.appendChild(new Option('before separator')); | |
| 40 menu.appendChild(document.createElement('hr')); | |
| 41 menu.appendChild(new Option('after separator')); | |
| 42 var group = document.getElementById('group'); | |
| 43 group.appendChild(document.createElement('hr')); | |
| 44 var nestedGroup = document.createElement('optgroup'); | |
| 45 nestedGroup.label = 'Nested group'; | |
| 46 nestedGroup.innerHTML = '<option>Should not be shown</option>'; | |
| 47 group.appendChild(nestedGroup); | |
| 48 openPicker(menu, finishJSTest, function () { | |
| 49 testFailed('picker didn\'t open') | |
| 50 finishJSTest(); | |
| 51 }); | |
| 52 </script> | |
| 53 </body> | |
| 54 </html> | |
| OLD | NEW |