blob: b034e29b75ab6532339f1f49209faacbf0f8dbb2 (
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
25
26
|
<!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>
|