OLD | NEW |
---|---|
(Empty) | |
1 library KeyboardEventTest; | |
2 import '../../pkg/unittest/lib/unittest.dart'; | |
3 import '../../pkg/unittest/lib/html_config.dart'; | |
4 import 'dart:html'; | |
5 | |
6 // Test that we are correctly determining keyCode and charCode uniformly across | |
7 // browsers. | |
8 | |
9 main() { | |
10 | |
11 useHtmlConfiguration(); | |
12 | |
13 keydownHandlerTest(KeyEvent e) { | |
14 print('keycode ${e.keyCode}'); | |
blois
2012/11/29 17:06:34
Can you add a comment as to why this doesn't do mu
Emily Fortuna
2012/11/29 19:19:50
Sure... I can just delete the test, because it rea
blois
2012/11/29 21:04:55
It may be handy to keep around for debugging since
| |
15 print('charcode ${e.charCode}'); | |
16 //expect(e.charCode, 0); | |
17 //expect(e.keyCode, 0); | |
18 } | |
19 | |
20 test('keys', () { | |
21 var controller = new KeyboardEventController.keydown(document.window); | |
22 controller.add(keydownHandlerTest); | |
23 document.window.on.keyDown.add((e) => print('regular listener'), false); | |
24 }); | |
25 } | |
26 | |
27 | |
OLD | NEW |