OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // TODO(nweiz): Make this private to testEvents when Frog supports closures with | 5 // TODO(nweiz): Make this private to testEvents when Frog supports closures with |
6 // optional arguments. | 6 // optional arguments. |
7 eventTest(String name, Event eventFn(), void validate(Event), | 7 eventTest(String name, Event eventFn(), void validate(Event), |
8 [String type = 'foo']) { | 8 [String type = 'foo']) { |
9 test(name, () { | 9 test(name, () { |
10 final el = new Element.tag('div'); | 10 final el = new Element.tag('div'); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 Expect.isTrue(ev.metaKey); | 207 Expect.isTrue(ev.metaKey); |
208 }, type: 'mousewheel'); | 208 }, type: 'mousewheel'); |
209 | 209 |
210 // XMLHttpRequestProgressEvent has no properties to itself, so just test that | 210 // XMLHttpRequestProgressEvent has no properties to itself, so just test that |
211 // it doesn't error out on creation and can be dispatched. | 211 // it doesn't error out on creation and can be dispatched. |
212 // Issue 1005. | 212 // Issue 1005. |
213 // eventTest('XMLHttpRequestProgressEvent', | 213 // eventTest('XMLHttpRequestProgressEvent', |
214 // () => new XMLHttpRequestProgressEvent('foo', 5), | 214 // () => new XMLHttpRequestProgressEvent('foo', 5), |
215 // (ev) {}); | 215 // (ev) {}); |
216 } | 216 } |
OLD | NEW |