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

Unified Diff: tests/html/keyboard_event_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, 9 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: tests/html/keyboard_event_test.dart
diff --git a/tests/html/keyboard_event_test.dart b/tests/html/keyboard_event_test.dart
index 01aff7633858e21b98d22b05eabe523740e311aa..a29f02f708e901eb89b73976557d2f0af6cfca73 100644
--- a/tests/html/keyboard_event_test.dart
+++ b/tests/html/keyboard_event_test.dart
@@ -31,7 +31,7 @@ main() {
test('constructKeyEvent', () {
var stream = KeyEvent.keyPressEvent.forTarget(document.body);
- var subscription = stream.listen(expectAsync1((keyEvent) {
+ var subscription = stream.listen(expectAsync((keyEvent) {
expect(keyEvent.charCode, 97);
expect(keyEvent.keyCode, 65);
}));
@@ -41,7 +41,7 @@ main() {
// Capital "A":
stream.add(new KeyEvent('keydown', keyCode: 16, charCode: 0));
- subscription = stream.listen(expectAsync1((keyEvent) {
+ subscription = stream.listen(expectAsync((keyEvent) {
expect(keyEvent.charCode, 65);
expect(keyEvent.keyCode, 65);
}));
@@ -56,17 +56,17 @@ main() {
var streamPress = KeyEvent.keyPressEvent.forTarget(document.body);
var streamUp = KeyEvent.keyUpEvent.forTarget(document.body);
- var subscription = streamDown.listen(expectAsync1((keyEvent) {
+ var subscription = streamDown.listen(expectAsync((keyEvent) {
expect(keyEvent.keyCode, isIn([16, 191]));
expect(keyEvent.charCode, 0);
}, count: 2));
- var subscription2 = streamPress.listen(expectAsync1((keyEvent) {
+ var subscription2 = streamPress.listen(expectAsync((keyEvent) {
expect(keyEvent.keyCode, 23);
expect(keyEvent.charCode, 63);
}));
- var subscription3 = streamUp.listen(expectAsync1((keyEvent) {
+ var subscription3 = streamUp.listen(expectAsync((keyEvent) {
expect(keyEvent.keyCode, isIn([16, 191]));
expect(keyEvent.charCode, 0);
}, count: 2));
@@ -84,7 +84,7 @@ main() {
});
test('KeyEventKeyboardEvent', () {
- window.onKeyDown.listen(expectAsync1((KeyboardEvent event) {
+ window.onKeyDown.listen(expectAsync((KeyboardEvent event) {
expect(event.keyCode, 16);
}));
var streamDown = KeyEvent.keyDownEvent.forTarget(document.body);

Powered by Google App Engine
This is Rietveld 408576698