| Index: pkg/template_binding/test/template_binding_test.dart
|
| diff --git a/pkg/template_binding/test/template_binding_test.dart b/pkg/template_binding/test/template_binding_test.dart
|
| index cc52811e8fbc5f2498e1ec9d101d757dbb4066ac..7639d760f15063ea48f11e75125743a8a794b9ef 100644
|
| --- a/pkg/template_binding/test/template_binding_test.dart
|
| +++ b/pkg/template_binding/test/template_binding_test.dart
|
| @@ -1177,27 +1177,38 @@ templateInstantiationTests() {
|
| });
|
|
|
| recursivelySetTemplateModel(div, m);
|
| - Observable.dirtyCheck();
|
|
|
| - // Use a timer so it's slower than mutation observers.
|
| - return new Future(() {
|
| + var completer = new Completer();
|
| +
|
| + new MutationObserver((records, observer) {
|
| var select = div.nodes[0].nextNode;
|
| - expect(select.nodes.length, 2);
|
| + if (select == null || select.querySelector('option') == null) return;
|
|
|
| - expect(select.selectedIndex, 1, reason: 'selected index should update by '
|
| - 'animationFrame time');
|
| + observer.disconnect();
|
| + new Future(() {
|
| + expect(select.nodes.length, 2);
|
|
|
| - expect(select.nodes[0].tagName, 'TEMPLATE');
|
| - expect((templateBind(templateBind(select.nodes[0]).ref)
|
| - .content.nodes[0] as Element).tagName, 'OPTGROUP');
|
| + expect(select.selectedIndex, 1, reason: 'selected index should update '
|
| + 'after template expands.');
|
|
|
| - var optgroup = select.nodes[1];
|
| - expect(optgroup.nodes[0].tagName, 'TEMPLATE');
|
| - expect(optgroup.nodes[1].tagName, 'OPTION');
|
| - expect(optgroup.nodes[1].text, '0');
|
| - expect(optgroup.nodes[2].tagName, 'OPTION');
|
| - expect(optgroup.nodes[2].text, '1');
|
| - });
|
| + expect(select.nodes[0].tagName, 'TEMPLATE');
|
| + expect((templateBind(templateBind(select.nodes[0]).ref)
|
| + .content.nodes[0] as Element).tagName, 'OPTGROUP');
|
| +
|
| + var optgroup = select.nodes[1];
|
| + expect(optgroup.nodes[0].tagName, 'TEMPLATE');
|
| + expect(optgroup.nodes[1].tagName, 'OPTION');
|
| + expect(optgroup.nodes[1].text, '0');
|
| + expect(optgroup.nodes[2].tagName, 'OPTION');
|
| + expect(optgroup.nodes[2].text, '1');
|
| +
|
| + completer.complete();
|
| + });
|
| + })..observe(div, childList: true, subtree: true);
|
| +
|
| + Observable.dirtyCheck();
|
| +
|
| + return completer.future;
|
| });
|
|
|
| observeTest('NestedIterateTableMixedSemanticNative', () {
|
|
|