| 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 | 5 |
| 6 #library('dartcombat_tests'); | 6 #library('dartcombat_tests'); |
| 7 | 7 |
| 8 #import('../../../../html/html.dart'); | 8 #import('dart:html'); |
| 9 #import('../../../../testing/unittest/unittest.dart'); | 9 #import('../../../../testing/unittest/unittest.dart'); |
| 10 #import('../../../../samples/dartcombat/dartcombatlib.dart'); | 10 #import('../../../../samples/dartcombat/dartcombatlib.dart'); |
| 11 | 11 |
| 12 ReceivePort testPort; | 12 ReceivePort testPort; |
| 13 | 13 |
| 14 main() { | 14 main() { |
| 15 testPort = new ReceivePort(); | 15 testPort = new ReceivePort(); |
| 16 | 16 |
| 17 setupUI(); | 17 setupUI(); |
| 18 // add relative URL to stylesheet to the correct location. Note: The CSS is | 18 // add relative URL to stylesheet to the correct location. Note: The CSS is |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 140 } |
| 141 | 141 |
| 142 doMouseEvent(String type, var targetCell) { | 142 doMouseEvent(String type, var targetCell) { |
| 143 final point = window.webkitConvertPointFromNodeToPage(targetCell, | 143 final point = window.webkitConvertPointFromNodeToPage(targetCell, |
| 144 new Point(5, 5)); | 144 new Point(5, 5)); |
| 145 | 145 |
| 146 MouseEvent e = new MouseEvent(type, window, 0, 0, 0, point.x, point.y, 0, | 146 MouseEvent e = new MouseEvent(type, window, 0, 0, 0, point.x, point.y, 0, |
| 147 relatedTarget: targetCell); | 147 relatedTarget: targetCell); |
| 148 targetCell.on[type].dispatch(e); | 148 targetCell.on[type].dispatch(e); |
| 149 } | 149 } |
| OLD | NEW |