| OLD | NEW |
| 1 library CSSTest; | 1 library CssTest; |
| 2 import '../../pkg/unittest/lib/unittest.dart'; | 2 import '../../pkg/unittest/lib/unittest.dart'; |
| 3 import '../../pkg/unittest/lib/html_config.dart'; | 3 import '../../pkg/unittest/lib/html_config.dart'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 | 5 |
| 6 main() { | 6 main() { |
| 7 useHtmlConfiguration(); | 7 useHtmlConfiguration(); |
| 8 test('CSSMatrix', () { | 8 test('CssMatrix', () { |
| 9 CSSMatrix matrix1 = new CSSMatrix(); | 9 CssMatrix matrix1 = new CssMatrix(); |
| 10 expect(matrix1.m11.round(), equals(1)); | 10 expect(matrix1.m11.round(), equals(1)); |
| 11 expect(matrix1.m12.round(), isZero); | 11 expect(matrix1.m12.round(), isZero); |
| 12 | 12 |
| 13 CSSMatrix matrix2 = new CSSMatrix('matrix(1, 0, 0, 1, -835, 0)'); | 13 CssMatrix matrix2 = new CssMatrix('matrix(1, 0, 0, 1, -835, 0)'); |
| 14 expect(matrix2.a.round(), equals(1)); | 14 expect(matrix2.a.round(), equals(1)); |
| 15 expect(matrix2.e.round(), equals(-835)); | 15 expect(matrix2.e.round(), equals(-835)); |
| 16 }); | 16 }); |
| 17 test('Point', () { | 17 test('Point', () { |
| 18 Element element = new Element.tag('div'); | 18 Element element = new Element.tag('div'); |
| 19 element.attributes['style'] = | 19 element.attributes['style'] = |
| 20 ''' | 20 ''' |
| 21 position: absolute; | 21 position: absolute; |
| 22 width: 60px; | 22 width: 60px; |
| 23 height: 100px; | 23 height: 100px; |
| (...skipping 10 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, Point point) { | 40 void checkPoint(expectedX, expectedY, Point point) { |
| 41 expect(point.x.round(), equals(expectedX), reason: 'Wrong point.x'); | 41 expect(point.x.round(), equals(expectedX), reason: 'Wrong point.x'); |
| 42 expect(point.y.round(), equals(expectedY), reason: 'Wrong point.y'); | 42 expect(point.y.round(), equals(expectedY), reason: 'Wrong point.y'); |
| 43 } | 43 } |
| OLD | NEW |