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

Unified Diff: tests/html/custom/attribute_changed_callback_test.dart

Issue 1060103002: Fix attribute_changed_callback_test to expect event delivery either synchronously or asynchronously (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months 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 | tests/html/html.status » ('j') | tests/html/html.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/custom/attribute_changed_callback_test.dart
diff --git a/tests/html/custom/attribute_changed_callback_test.dart b/tests/html/custom/attribute_changed_callback_test.dart
index 71ffaec3fbc3bb06b4d8f32af34b26b49b2b70c1..07abbf3e0af10637bb38f6d2d5c42cf131670bc3 100644
--- a/tests/html/custom/attribute_changed_callback_test.dart
+++ b/tests/html/custom/attribute_changed_callback_test.dart
@@ -4,6 +4,7 @@
library attribute_changed_callback_test;
+import 'dart:async';
import 'dart:html';
import 'dart:js' as js;
import 'package:unittest/html_individual_config.dart';
@@ -90,11 +91,15 @@ main() {
var b = new B();
b.id = 'x';
- expect(B.invocations, ['created', 'id: null => x']);
-
- B.invocations = [];
- b.attributes.remove('id');
- expect(B.invocations, ['id: x => null']);
+
+ return new Future.delayed(new Duration(milliseconds: 1))
+ .then((_) => expect(B.invocations, ['created', 'id: null => x']))
+ .then((_) {
+ B.invocations = [];
+ b.attributes.remove('id');
+ })
+ .then((_) => new Future.delayed(new Duration(milliseconds: 1)))
+ .then((_) => expect(B.invocations, ['id: x => null']));
});
});
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | tests/html/html.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698