OLD | NEW |
1 #library('WrapperTest'); | 1 #library('WrapperTest'); |
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 HTMLCanvasElement canvas; | 7 HTMLCanvasElement canvas; |
8 CanvasRenderingContext2D context; | 8 CanvasRenderingContext2D context; |
9 | 9 |
10 canvas = document.createElement('canvas'); | 10 canvas = document.createElement('canvas'); |
11 canvas.id = 'canvas'; | 11 canvas.id = 'canvas'; |
12 canvas.setAttribute('width', '100'); | 12 canvas.setAttribute('width', '100'); |
13 canvas.setAttribute('height', '100'); | 13 canvas.setAttribute('height', '100'); |
(...skipping 11 matching lines...) Expand all Loading... |
25 | 25 |
26 Expect.equals(42, canvas.dynamic.dartObjectLocalStorage); | 26 Expect.equals(42, canvas.dynamic.dartObjectLocalStorage); |
27 }); | 27 }); |
28 test('TypeName', () { | 28 test('TypeName', () { |
29 final element = document.getElementById('canvas'); | 29 final element = document.getElementById('canvas'); |
30 Expect.stringEquals('HTMLCanvasElement', element.typeName); | 30 Expect.stringEquals('HTMLCanvasElement', element.typeName); |
31 Expect.stringEquals('HTMLCanvasElement', canvas.dynamic.typeName); | 31 Expect.stringEquals('HTMLCanvasElement', canvas.dynamic.typeName); |
32 Expect.stringEquals('CanvasRenderingContext2D', context.dynamic.typeName); | 32 Expect.stringEquals('CanvasRenderingContext2D', context.dynamic.typeName); |
33 }); | 33 }); |
34 } | 34 } |
OLD | NEW |