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

Unified Diff: tests/html/native_gc_test.dart

Issue 11909004: Attempt to solve the flakiness of the test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 87251be4c19fb67c1b42520f40c73e6dac73cd8e..e85acfb7bc0c27d5289c522d90f190e9a455088f 100644
--- a/tests/html/native_gc_test.dart
+++ b/tests/html/native_gc_test.dart
@@ -32,17 +32,21 @@ main() {
});
test('WindowEventListener', () {
+ String message = 'WindowEventListenerTestPingMessage';
+
Element testDiv = new DivElement();
testDiv.id = '#TestDiv';
document.body.nodes.add(testDiv);
- window.on.message.add((e) => testDiv.click());
+ window.on.message.add((e) {
+ if (e.data == message) testDiv.click();
+ });
for (int i = 0; i < 100; ++i) {
triggerMajorGC();
}
testDiv.on.click.add(expectAsync1((e) {}));
- window.postMessage('test', '*');
+ window.postMessage(message, '*');
});
}
« 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