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

Unified Diff: tests/html/native_gc_test.dart

Issue 10689120: Add test for garbage collected window event listeners issue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/native_gc_test.dart
diff --git a/tests/html/native_gc_test.dart b/tests/html/native_gc_test.dart
index 1882c6e2e00f9de246ca696f61bce7b01f0bd4a0..d213336fb5044dc80c0c88b6794486ee613f6c73 100644
--- a/tests/html/native_gc_test.dart
+++ b/tests/html/native_gc_test.dart
@@ -6,6 +6,11 @@
main() {
useHtmlConfiguration();
+ Element testDiv = new DivElement();
+ testDiv.id = '#TestDiv';
+ document.body.nodes.add(testDiv);
+ window.on.message.add((e) => testDiv.click());
+
test('EventListener', () {
final int N = 1000000;
final int M = 1000;
@@ -30,4 +35,9 @@ main() {
final event = new Event('test');
div.on['test'].dispatch(event);
});
+
+ test('WindowEventListener', () {
+ testDiv.on.click.add(expectAsync1((e) {}));
Anton Muhin 2012/07/06 15:06:15 isn't it too fragile to depend on the test order?
podivilov 2012/07/06 16:08:19 Done.
+ window.postMessage('test', '*');
+ });
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698