blob: 5606deeafc548daf1d07d68eafd3481afb4a84ae [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<select size="2">
<option>PASS</option>FAIL
</select>
<script>
var select = document.querySelector('select');
var div = select.appendChild(document.createElement('div'));
div.innerText = 'FAIL';
div.style.background = 'red';
// innerText uses the render tree, and the "FAIL" text (from either the initial
// HTML or the dynamially inserted <div>) should not be in the render tree, thus
// not appear.
test(() =>
assert_equals(select.innerText, 'PASS'),
'SELECT should not render other than OPTION and OPTGROUP');
</script>