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

Side by Side Diff: tests/html/keyboard_event_test.dart

Issue 231413003: using unittest via package import (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/html/js_test.dart ('k') | tests/html/localstorage_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library KeyboardEventTest; 1 library KeyboardEventTest;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import 'package:unittest/unittest.dart';
3 import '../../pkg/unittest/lib/html_config.dart'; 3 import 'package:unittest/html_config.dart';
4 import 'dart:html'; 4 import 'dart:html';
5 5
6 // Test that we are correctly determining keyCode and charCode uniformly across 6 // Test that we are correctly determining keyCode and charCode uniformly across
7 // browsers. 7 // browsers.
8 8
9 main() { 9 main() {
10 10
11 useHtmlConfiguration(); 11 useHtmlConfiguration();
12 12
13 keydownHandlerTest(KeyEvent e) { 13 keydownHandlerTest(KeyEvent e) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 test('KeyEventKeyboardEvent', () { 86 test('KeyEventKeyboardEvent', () {
87 window.onKeyDown.listen(expectAsync((KeyboardEvent event) { 87 window.onKeyDown.listen(expectAsync((KeyboardEvent event) {
88 expect(event.keyCode, 16); 88 expect(event.keyCode, 16);
89 })); 89 }));
90 var streamDown = KeyEvent.keyDownEvent.forTarget(document.body); 90 var streamDown = KeyEvent.keyDownEvent.forTarget(document.body);
91 streamDown.add(new KeyEvent('keydown', keyCode: 16, charCode: 0)); 91 streamDown.add(new KeyEvent('keydown', keyCode: 16, charCode: 0));
92 }); 92 });
93 } 93 }
94 94
95 95
OLDNEW
« no previous file with comments | « tests/html/js_test.dart ('k') | tests/html/localstorage_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698