Chromium Code Reviews| 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 library ElementTest; | 5 library ElementTest; |
| 6 import '../../pkg/unittest/lib/unittest.dart'; | 6 import '../../pkg/unittest/lib/unittest.dart'; |
| 7 import '../../pkg/unittest/lib/html_individual_config.dart'; | 7 import '../../pkg/unittest/lib/html_individual_config.dart'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'dart:svg' as svg; | 9 import 'dart:svg' as svg; |
| 10 | 10 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 testEventHelper(on.touchEnd, 'touchend', | 232 testEventHelper(on.touchEnd, 'touchend', |
| 233 (listener) => Testing.addEventListener( | 233 (listener) => Testing.addEventListener( |
| 234 element, 'touchend', listener, true)); | 234 element, 'touchend', listener, true)); |
| 235 testEventHelper(on.touchLeave, 'touchleave'); | 235 testEventHelper(on.touchLeave, 'touchleave'); |
| 236 testEventHelper(on.touchMove, 'touchmove', | 236 testEventHelper(on.touchMove, 'touchmove', |
| 237 (listener) => Testing.addEventListener( | 237 (listener) => Testing.addEventListener( |
| 238 element, 'touchmove', listener, true)); | 238 element, 'touchmove', listener, true)); |
| 239 testEventHelper(on.touchStart, 'touchstart', | 239 testEventHelper(on.touchStart, 'touchstart', |
| 240 (listener) => Testing.addEventListener( | 240 (listener) => Testing.addEventListener( |
| 241 element, 'touchstart', listener, true)); | 241 element, 'touchstart', listener, true)); |
| 242 testEventHelper(on.transitionEnd, 'webkitTransitionEnd'); | |
| 243 testEventHelper(on.fullscreenChange, 'webkitfullscreenchange', | |
|
blois
2012/12/28 21:18:37
The fact that these pass on all browsers shows tha
| |
| 244 (listener) => Testing.addEventListener(element, | |
| 245 'webkitfullscreenchange', listener, true)); | |
| 242 }); | 246 }); |
| 243 }); | 247 }); |
| 244 | 248 |
| 245 group('click', () { | 249 group('click', () { |
| 246 test('clickEvent', () { | 250 test('clickEvent', () { |
| 247 var e = new DivElement(); | 251 var e = new DivElement(); |
| 248 var firedEvent = false; | 252 var firedEvent = false; |
| 249 e.on.click.add((event) { | 253 e.on.click.add((event) { |
| 250 firedEvent = true; | 254 firedEvent = true; |
| 251 }); | 255 }); |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 594 }); | 598 }); |
| 595 | 599 |
| 596 test('getRange', () { | 600 test('getRange', () { |
| 597 var range = makeElList().getRange(1, 2); | 601 var range = makeElList().getRange(1, 2); |
| 598 expect(range, isElementList); | 602 expect(range, isElementList); |
| 599 expect(range[0], isImageElement); | 603 expect(range[0], isImageElement); |
| 600 expect(range[1], isInputElement); | 604 expect(range[1], isInputElement); |
| 601 }); | 605 }); |
| 602 }); | 606 }); |
| 603 } | 607 } |
| OLD | NEW |