Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: tests/html/instance_of_test.dart

Issue 10914286: Remove Object.dynamic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review smells. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/language/number_syntax_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #library('InstanceOfTest'); 1 #library('InstanceOfTest');
2 #import('../../pkg/unittest/unittest.dart'); 2 #import('../../pkg/unittest/unittest.dart');
3 #import('../../pkg/unittest/html_config.dart'); 3 #import('../../pkg/unittest/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;
(...skipping 11 matching lines...) Expand all
22 22
23 CanvasRenderingContext2D context = canvas.getContext('2d'); 23 CanvasRenderingContext2D context = canvas.getContext('2d');
24 Expect.isTrue(context is CanvasRenderingContext); 24 Expect.isTrue(context is CanvasRenderingContext);
25 Expect.isTrue(context is CanvasRenderingContext2D); 25 Expect.isTrue(context is CanvasRenderingContext2D);
26 Expect.isFalse(context is Element); 26 Expect.isFalse(context is Element);
27 Expect.isFalse(context is CanvasElement); 27 Expect.isFalse(context is CanvasElement);
28 Expect.isFalse(context is ImageData); 28 Expect.isFalse(context is ImageData);
29 // Expect.isFalse(context is CanvasPixelArray); 29 // Expect.isFalse(context is CanvasPixelArray);
30 30
31 // FIXME(b/5286633): Interface injection type check workaround. 31 // FIXME(b/5286633): Interface injection type check workaround.
32 var image = context.createImageData(canvas.width.dynamic, canvas.height.dyna mic); 32 var image = context.createImageData(canvas.width as Dynamic,
33 canvas.height as Dynamic);
33 Expect.isFalse(image is CanvasRenderingContext); 34 Expect.isFalse(image is CanvasRenderingContext);
34 Expect.isFalse(image is CanvasRenderingContext2D); 35 Expect.isFalse(image is CanvasRenderingContext2D);
35 Expect.isFalse(image is Element); 36 Expect.isFalse(image is Element);
36 Expect.isFalse(image is CanvasElement); 37 Expect.isFalse(image is CanvasElement);
37 Expect.isTrue(image is ImageData); 38 Expect.isTrue(image is ImageData);
38 // Expect.isFalse(image is CanvasPixelArray); 39 // Expect.isFalse(image is CanvasPixelArray);
39 40
40 // Include CanvasPixelArray since constructor and prototype are not 41 // Include CanvasPixelArray since constructor and prototype are not
41 // available until one is created. 42 // available until one is created.
42 var bytes = image.data; 43 var bytes = image.data;
43 Expect.isFalse(bytes is CanvasRenderingContext); 44 Expect.isFalse(bytes is CanvasRenderingContext);
44 Expect.isFalse(bytes is CanvasRenderingContext2D); 45 Expect.isFalse(bytes is CanvasRenderingContext2D);
45 Expect.isFalse(bytes is Element); 46 Expect.isFalse(bytes is Element);
46 Expect.isFalse(bytes is CanvasElement); 47 Expect.isFalse(bytes is CanvasElement);
47 Expect.isFalse(bytes is ImageData); 48 Expect.isFalse(bytes is ImageData);
48 Expect.isTrue(bytes is Uint8ClampedArray); 49 Expect.isTrue(bytes is Uint8ClampedArray);
49 50
50 // FIXME: Ensure this is an SpanElement when we next update 51 // FIXME: Ensure this is an SpanElement when we next update
51 // WebKit IDL. 52 // WebKit IDL.
52 var span = new Element.tag('span'); 53 var span = new Element.tag('span');
53 Expect.isTrue(span is Element); 54 Expect.isTrue(span is Element);
54 }); 55 });
55 } 56 }
OLDNEW
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/language/number_syntax_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698