Chromium Code Reviews| Index: tests/html/custom/template_wrappers_test.dart |
| diff --git a/tests/html/custom/template_wrappers_test.dart b/tests/html/custom/template_wrappers_test.dart |
| index 8754f857e190f273759182f261d1fac50236fe0d..3aeb8f54a795a776d9d14b144babf59a805f63c9 100644 |
| --- a/tests/html/custom/template_wrappers_test.dart |
| +++ b/tests/html/custom/template_wrappers_test.dart |
| @@ -32,7 +32,6 @@ void customElementsTakeRecords() { |
| main() { |
| useHtmlConfiguration(); |
| - var registeredTypes = false; |
| setUp(loadPolyfills); |
| test('element is upgraded once', () { |
| @@ -52,12 +51,30 @@ main() { |
| expect(createdCount, 1); |
| }); |
| }); |
| + |
| + test('old wrappers do not cause multiple upgrades', () { |
| + createdCount = 0; |
| + var d1 = document.querySelector('x-custom-two'); |
| + d1.attributes['foo'] = 'bar'; |
| + d1 = null; |
| + |
| + document.register('x-custom-two', CustomElement); |
| + |
| + expect(createdCount, 1); |
| + |
| + forceGC(); |
| + |
| + return new Future.delayed(new Duration(milliseconds: 50)).then((_) { |
| + var d = document.querySelector('x-custom-two'); |
| + expect(createdCount, 1); |
| + }); |
| + }); |
| } |
| void forceGC() { |
| var N = 1000000; |
| - var M = 1000; |
| + var M = 100; |
|
blois
2013/10/31 18:43:13
Bumping down to 100 makes this quite a bit faster
siva
2013/10/31 19:49:05
This seems like a very contrived way to trigger a
|
| for (var i = 0; i < M; ++i) { |
| var l = new List(N); |
| } |