| Index: third_party/WebKit/LayoutTests/fast/forms/select/select-ask-for-reset.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/forms/select/select-ask-for-reset.html b/third_party/WebKit/LayoutTests/fast/forms/select/select-ask-for-reset.html
|
| index 3f2b430480efe4e494a8e9bf21698852c5281168..5102576d99c415ff36a31319f888dbf049c6975d 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/forms/select/select-ask-for-reset.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/forms/select/select-ask-for-reset.html
|
| @@ -49,5 +49,21 @@ test(function() {
|
| select.removeChild(select.lastChild);
|
| assert_equals(select.selectedIndex, 0);
|
| }, 'Removing an OPTION from a SELECT element should reset selection.');
|
| +
|
| +test(function() {
|
| + var select = document.createElement('select');
|
| + select.multiple = true;
|
| + select.innerHTML = '<option selected>foo</option><option selected>bar</option>';
|
| + document.body.appendChild(select);
|
| + select.removeAttribute('multiple');
|
| + assert_equals(select.selectedOptions.length, 1);
|
| + assert_equals(select.selectedIndex, 0, 'The first selected OPTION should be chosen.');
|
| +
|
| + select.selectedIndex = -1;
|
| + select.multiple = true;
|
| + select.multiple = false;
|
| + assert_equals(select.selectedOptions.length, 1);
|
| + assert_equals(select.selectedIndex, 0);
|
| +}, 'Changing multiple SELECT to single should reset selection.');
|
| </script>
|
| </body>
|
|
|