Chromium Code Reviews| Index: tests/html/keyboard_event_test.dart |
| diff --git a/tests/html/keyboard_event_test.dart b/tests/html/keyboard_event_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c9057896f5504db9c0b27b972f1d12c684d563c9 |
| --- /dev/null |
| +++ b/tests/html/keyboard_event_test.dart |
| @@ -0,0 +1,27 @@ |
| +library KeyboardEventTest; |
| +import '../../pkg/unittest/lib/unittest.dart'; |
| +import '../../pkg/unittest/lib/html_config.dart'; |
| +import 'dart:html'; |
| + |
| +// Test that we are correctly determining keyCode and charCode uniformly across |
| +// browsers. |
| + |
| +main() { |
| + |
| + useHtmlConfiguration(); |
|
Emily Fortuna
2012/11/28 22:58:12
again, not a real test. more for user testing than
|
| + |
| + keydownHandlerTest(KeyEvent e) { |
| + print('keycode ${e.keyCode}'); |
| + print('charcode ${e.charCode}'); |
| + //expect(e.charCode, 0); |
| + //expect(e.keyCode, 0); |
| + } |
| + |
| + test('keys', () { |
| + var controller = new KeyboardEventController.keydown(document.window); |
| + controller.add(keydownHandlerTest); |
| + document.window.on.keyDown.add((e) => print('regular listener'), false); |
| + }); |
| +} |
| + |
| + |