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

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

Issue 558673004: update polymer js to 0.4.0 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: review updates Created 6 years, 3 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 | « pkg/template_binding/test/node_bind_test.html ('k') | pkg/template_binding/test/template_binding_test.html » ('j') | 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 de7e8c37af7f783668f6f50f0c25fa84ef6a87c0..fde463b55f6e83d9d4a4b1a6e674dc9a9b01e20d 100644
--- a/pkg/template_binding/test/template_binding_test.dart
+++ b/pkg/template_binding/test/template_binding_test.dart
@@ -1369,14 +1369,22 @@ templateInstantiationTests() {
expect(div.nodes.length, 4);
expect('Hi, Fry', div.nodes[3].text);
- div.nodes[2].attributes['ref'] = 'B';
+ // In IE 11, MutationObservers do not fire before setTimeout.
+ // So rather than using "then" to queue up the next test, we use a
+ // MutationObserver here to detect the change to "ref".
+ var done = new Completer();
+ new MutationObserver((mutations, observer) {
+ expect(div.nodes.length, 5);
+
+ expect('Hola, Fry', div.nodes[3].text);
+ expect('Hola, Leela', div.nodes[4].text);
+ done.complete();
+ }).observe(template, attributes: true, attributeFilter: ['ref']);
+
+ template.setAttribute('ref', 'B');
model.add('Leela');
- }).then(nextMicrotask).then((x) {
- expect(div.nodes.length, 5);
-
- expect('Hola, Fry', div.nodes[3].text);
- expect('Hola, Leela', div.nodes[4].text);
+ return done.future;
});
});
« no previous file with comments | « pkg/template_binding/test/node_bind_test.html ('k') | pkg/template_binding/test/template_binding_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698