Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Unified Diff: pkg/template_binding/test/template_binding_test.dart

Issue 86153003: attempt to reduce IE flakiness in template_bind_test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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', () {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698