| Index: tests/html/selectelement_test.dart
|
| diff --git a/tests/html/selectelement_test.dart b/tests/html/selectelement_test.dart
|
| index 300e29ec6180e1b5b5a79ee3e166730c8e05b1ab..8b7d76b1e9fe4842b1c84414a50a65b99f6708de 100644
|
| --- a/tests/html/selectelement_test.dart
|
| +++ b/tests/html/selectelement_test.dart
|
| @@ -55,4 +55,21 @@ main() {
|
| // Use last to make sure that the list was correctly wrapped.
|
| expect(element.options.last, equals(options[3]));
|
| });
|
| +
|
| + test('optgroup', () {
|
| + var element = new SelectElement();
|
| + element.innerHtml =
|
| + '<option>1</option>'
|
| + '<optgroup>'
|
| + '<option>2</option>'
|
| + '</optgroup>';
|
| +
|
| + expect(element.options.length, 2);
|
| + element.selectedIndex = 1;
|
| +
|
| + var optGroup = element.children[1];
|
| + expect(optGroup is OptGroupElement, isTrue);
|
| + expect(optGroup.children.single.selected, isTrue);
|
| + expect(element.selectedOptions, optGroup.children);
|
| + });
|
| }
|
|
|