| OLD | NEW |
| 1 #library('CSSTest'); | 1 #library('CSSTest'); |
| 2 #import('../../../../lib/unittest/unittest.dart'); | 2 #import('../../lib/unittest/unittest.dart'); |
| 3 #import('../../../../lib/unittest/dom_config.dart'); | 3 #import('../../lib/unittest/dom_config.dart'); |
| 4 #import('dart:dom'); | 4 #import('dart:dom'); |
| 5 | 5 |
| 6 main() { | 6 main() { |
| 7 useDomConfiguration(); | 7 useDomConfiguration(); |
| 8 test('WebKitCSSMatrix', () { | 8 test('WebKitCSSMatrix', () { |
| 9 WebKitCSSMatrix matrix1 = new WebKitCSSMatrix(); | 9 WebKitCSSMatrix matrix1 = new WebKitCSSMatrix(); |
| 10 Expect.equals(1, matrix1.m11.round()); | 10 Expect.equals(1, matrix1.m11.round()); |
| 11 Expect.equals(0, matrix1.m12.round()); | 11 Expect.equals(0, matrix1.m12.round()); |
| 12 | 12 |
| 13 WebKitCSSMatrix matrix2 = new WebKitCSSMatrix('matrix(1, 0, 0, 1, -835, 0)')
; | 13 WebKitCSSMatrix matrix2 = new WebKitCSSMatrix('matrix(1, 0, 0, 1, -835, 0)')
; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 34 point.y = 100; | 34 point.y = 100; |
| 35 checkPoint(5, 100, point); | 35 checkPoint(5, 100, point); |
| 36 checkPoint(254, 196, window.webkitConvertPointFromNodeToPage(element, point)
); | 36 checkPoint(254, 196, window.webkitConvertPointFromNodeToPage(element, point)
); |
| 37 }); | 37 }); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void checkPoint(expectedX, expectedY, WebKitPoint point) { | 40 void checkPoint(expectedX, expectedY, WebKitPoint point) { |
| 41 Expect.equals(expectedX, point.x.round(), 'Wrong point.x'); | 41 Expect.equals(expectedX, point.x.round(), 'Wrong point.x'); |
| 42 Expect.equals(expectedY, point.y.round(), 'Wrong point.y'); | 42 Expect.equals(expectedY, point.y.round(), 'Wrong point.y'); |
| 43 } | 43 } |
| OLD | NEW |