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

Unified Diff: client/tests/client/samples/swarm/swarm_tests.dart

Issue 8404013: Add constructors to all the event classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of html testing stuff and fix uses of init*Event. Created 9 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
Index: client/tests/client/samples/swarm/swarm_tests.dart
diff --git a/client/tests/client/samples/swarm/swarm_tests.dart b/client/tests/client/samples/swarm/swarm_tests.dart
index 98c35d161d92e76cf7e3a336fc4527ed91f818e1..db038c3131c3c89daf3a115764ba116235896398 100644
--- a/client/tests/client/samples/swarm/swarm_tests.dart
+++ b/client/tests/client/samples/swarm/swarm_tests.dart
@@ -102,9 +102,8 @@ void main() {
/** Triggers the click event, like [http://api.jquery.com/click/] */
click(Element element) {
// TODO(rnystrom): This should be on the DOM API somewhere.
- MouseEvent event = document.createEvent('MouseEvents');
- event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0,
- false, false, false, false, 0, null);
+ MouseEvent event = new MouseEvent('click', window, 1, 0, 0, 0, 0, 0,
+ canBubble: true, cancelable: true);
element.on.click.dispatch(event);
}

Powered by Google App Engine
This is Rietveld 408576698