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

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

Issue 25719003: Fixing Node.clone not returning upgraded custom elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | tools/dom/idl/dart/dart.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/custom/constructor_calls_created_synchronously_test.dart
diff --git a/tests/html/custom/constructor_calls_created_synchronously_test.dart b/tests/html/custom/constructor_calls_created_synchronously_test.dart
index 2238df6e2d67feb90e4ab107f06574d481984fe5..932f760072672b3fa415342c41cac7e399a07c1f 100644
--- a/tests/html/custom/constructor_calls_created_synchronously_test.dart
+++ b/tests/html/custom/constructor_calls_created_synchronously_test.dart
@@ -27,11 +27,28 @@ main() {
// Adapted from Blink's
// fast/dom/custom/constructor-calls-created-synchronously test.
- setUp(loadPolyfills);
+ var registered = false;
+ setUp(() {
+ return loadPolyfills().then((_) {
+ if (!registered) {
+ registered = true;
+ document.register(A.tag, A);
+ }
+ });
+ });
test('createdCallback', () {
- document.register(A.tag, A);
var x = new A();
expect(A.ncallbacks, 1);
});
+
+ test('clone node', () {
+ A.ncallbacks = 0;
+
+ var a = new A();
+ expect(A.ncallbacks, 1);
+ var b = a.clone(false);
+ expect(A.ncallbacks, 2);
+ expect(b is A, isTrue);
+ });
}
« no previous file with comments | « no previous file | tools/dom/idl/dart/dart.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698