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

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

Issue 12047054: Deprecating old DOM event APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/streams_test.dart ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library wheel_event_test; 5 library wheel_event_test;
6 import '../../pkg/unittest/lib/unittest.dart'; 6 import '../../pkg/unittest/lib/unittest.dart';
7 import '../../pkg/unittest/lib/html_config.dart'; 7 import '../../pkg/unittest/lib/html_config.dart';
8 import 'dart:html'; 8 import 'dart:html';
9 9
10 10
(...skipping 27 matching lines...) Expand all
38 var event = new WheelEvent(wheelEvent, 38 var event = new WheelEvent(wheelEvent,
39 window, 39 window,
40 0, 40 0,
41 240, 41 240,
42 0, 42 0,
43 100, 43 100,
44 200, 44 200,
45 10, 45 10,
46 20, 46 20,
47 0); 47 0);
48 element.$dom_dispatchEvent(event); 48 element.dispatchEvent(event);
49 }); 49 });
50 50
51 test('wheelEvent Stream', () { 51 test('wheelEvent Stream', () {
52 var element = new DivElement(); 52 var element = new DivElement();
53 element.onMouseWheel.listen(expectAsync1((e) { 53 element.onMouseWheel.listen(expectAsync1((e) {
54 expect(e.screenX, 100); 54 expect(e.screenX, 100);
55 expect(e.deltaX, 0); 55 expect(e.deltaX, 0);
56 expect(e.deltaY, 240); 56 expect(e.deltaY, 240);
57 })); 57 }));
58 var event = new WheelEvent(wheelEvent, 58 var event = new WheelEvent(wheelEvent,
59 window, 59 window,
60 0, 60 0,
61 240, 61 240,
62 0, 62 0,
63 100, 63 100,
64 200, 64 200,
65 10, 65 10,
66 20, 66 20,
67 0); 67 0);
68 element.$dom_dispatchEvent(event); 68 element.dispatchEvent(event);
69 }); 69 });
70 } 70 }
OLDNEW
« no previous file with comments | « tests/html/streams_test.dart ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698