OLD | NEW |
1 #library('InstanceOfTest'); | 1 library InstanceOfTest; |
2 #import('../../pkg/unittest/unittest.dart'); | 2 import '../../pkg/unittest/lib/unittest.dart'; |
3 #import('../../pkg/unittest/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 CanvasElement canvas; | 7 CanvasElement canvas; |
8 | 8 |
9 canvas = new Element.tag('canvas'); | 9 canvas = new Element.tag('canvas'); |
10 canvas.attributes['width'] = 100; | 10 canvas.attributes['width'] = 100; |
11 canvas.attributes['height'] = 100; | 11 canvas.attributes['height'] = 100; |
12 document.body.nodes.add(canvas); | 12 document.body.nodes.add(canvas); |
13 | 13 |
14 var isCanvasRenderingContext = predicate((x) => x is CanvasRenderingContext, | 14 var isCanvasRenderingContext = predicate((x) => x is CanvasRenderingContext, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 expect(bytes, isNot(isCanvasElement)); | 61 expect(bytes, isNot(isCanvasElement)); |
62 expect(bytes, isNot(isImageData)); | 62 expect(bytes, isNot(isImageData)); |
63 expect(bytes, isUint8ClampedArray); | 63 expect(bytes, isUint8ClampedArray); |
64 | 64 |
65 // FIXME: Ensure this is an SpanElement when we next update | 65 // FIXME: Ensure this is an SpanElement when we next update |
66 // WebKit IDL. | 66 // WebKit IDL. |
67 var span = new Element.tag('span'); | 67 var span = new Element.tag('span'); |
68 expect(span, isElement); | 68 expect(span, isElement); |
69 }); | 69 }); |
70 } | 70 } |
OLD | NEW |