<!DOCTYPE html>
<html>
<body>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<div id="log"></div>
<select>
<option></option>
<option></option>
<option></option>
<option></option>
</select>
<script>
test(function() {
    var select = document.querySelector('select');
    var option = document.querySelector('option');
    select.selectedIndex = -1;
    assert_equals(select.selectedIndex, -1);
    option.textContent = 'First choice';
    assert_equals(select.selectedIndex, -1);
    option.firstChild.insertData(5, ' awesome');
    assert_equals(select.selectedIndex, -1);
}, 'Updating Text nodes children of an OPTION element should not reset selection of the owner SELECT element.');
</script>
</body>
</html>
