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

Side by Side Diff: tests/html/native_gc_test.dart

Issue 218273002: Upgrading tests with unittest deprecations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library NativeGCTest; 1 library NativeGCTest;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_config.dart'; 3 import '../../pkg/unittest/lib/html_config.dart';
4 import 'dart:html'; 4 import 'dart:html';
5 5
6 var testEvent = new EventStreamProvider<Event>('test'); 6 var testEvent = new EventStreamProvider<Event>('test');
7 7
8 main() { 8 main() {
9 useHtmlConfiguration(); 9 useHtmlConfiguration();
10 10
(...skipping 29 matching lines...) Expand all
40 testDiv.id = '#TestDiv'; 40 testDiv.id = '#TestDiv';
41 document.body.append(testDiv); 41 document.body.append(testDiv);
42 window.onMessage.listen((e) { 42 window.onMessage.listen((e) {
43 if (e.data == message) testDiv.click(); 43 if (e.data == message) testDiv.click();
44 }); 44 });
45 45
46 for (int i = 0; i < 100; ++i) { 46 for (int i = 0; i < 100; ++i) {
47 triggerMajorGC(); 47 triggerMajorGC();
48 } 48 }
49 49
50 testDiv.onClick.listen(expectAsync1((e) {})); 50 testDiv.onClick.listen(expectAsync((e) {}));
51 window.postMessage(message, '*'); 51 window.postMessage(message, '*');
52 }); 52 });
53 } 53 }
54 54
55 void triggerMajorGC() { 55 void triggerMajorGC() {
56 List list = new List(1000000); 56 List list = new List(1000000);
57 Element div = new DivElement(); 57 Element div = new DivElement();
58 div.onClick.listen((e) => print(list[0])); 58 div.onClick.listen((e) => print(list[0]));
59 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698