OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <script src="../../resources/js-test.js"></script> | |
3 <select size="2"> | |
4 <option>PASS</option>FAIL | |
5 </select> | |
6 <script> | |
7 description('Check that a select control does not render children that are not &
lt;option> or <optgroup>.'); | |
8 | |
9 var select = document.querySelector('select'); | |
10 | |
11 var div = select.appendChild(document.createElement('div')); | |
12 div.innerText = 'FAIL'; | |
13 div.style.background = 'red'; | |
14 | |
15 // innerText uses the render tree, and the "FAIL" text (from either the initial | |
16 // HTML or the dynamially inserted <div>) should not be in the render tree, thus
| |
17 // not appear. | |
18 shouldBeEqualToString('select.innerText', ''); | |
19 </script> | |
OLD | NEW |