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