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

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

Issue 14883008: use .append instead of .nodes.add (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: revert node_test and element_test Created 7 years, 7 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/html/htmlelement_test.dart ('k') | tests/html/js_interop_1_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/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 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.append(canvas);
13 13
14 var isCanvasRenderingContext = predicate((x) => x is CanvasRenderingContext, 14 var isCanvasRenderingContext = predicate((x) => x is CanvasRenderingContext,
15 'is a CanvasRenderingContext'); 15 'is a CanvasRenderingContext');
16 var isCanvasRenderingContext2D = 16 var isCanvasRenderingContext2D =
17 predicate((x) => x is CanvasRenderingContext2D, 17 predicate((x) => x is CanvasRenderingContext2D,
18 'is a CanvasRenderingContext2D'); 18 'is a CanvasRenderingContext2D');
19 var isElement = predicate((x) => x is Element, 'is an Element'); 19 var isElement = predicate((x) => x is Element, 'is an Element');
20 var isCanvasElement = 20 var isCanvasElement =
21 predicate((x) => x is CanvasElement, 'is a CanvasElement'); 21 predicate((x) => x is CanvasElement, 'is a CanvasElement');
22 var isImageData = predicate((x) => x is ImageData, 'is an ImageData'); 22 var isImageData = predicate((x) => x is ImageData, 'is an ImageData');
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 expect(bytes, isNot(isCanvasElement)); 61 expect(bytes, isNot(isCanvasElement));
62 expect(bytes, isNot(isImageData)); 62 expect(bytes, isNot(isImageData));
63 expect(bytes, isIntList); 63 expect(bytes, isIntList);
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 }
OLDNEW
« no previous file with comments | « tests/html/htmlelement_test.dart ('k') | tests/html/js_interop_1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698