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

Unified Diff: tests/dom/canvas_pixel_array_type_alias_test.dart

Issue 10222026: Migrate dom tests to dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase & address comments. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/dom/canvas_pixel_array_type_alias_test.dart
diff --git a/tests/dom/canvas_pixel_array_type_alias_test.dart b/tests/dom/canvas_pixel_array_type_alias_test.dart
index c5c6abb1115c7fafae8c0a60a1375de3f596084f..bb72309ae7d559b229f0cc0cb8d8c28c58cdf975 100644
--- a/tests/dom/canvas_pixel_array_type_alias_test.dart
+++ b/tests/dom/canvas_pixel_array_type_alias_test.dart
@@ -1,7 +1,7 @@
#library('CanvasTest');
#import('../../lib/unittest/unittest.dart');
-#import('../../lib/unittest/dom_config.dart');
-#import('dart:dom');
+#import('../../lib/unittest/html_config.dart');
+#import('dart:html');
// We have aliased the legacy type CanvasPixelArray with the new type
// Uint8ClampedArray by mapping the CanvasPixelArray type tag to
@@ -11,19 +11,19 @@
Object confuseType(x) => [1, x, [x], 's'] [1]; // returns 'x'
main() {
- HTMLCanvasElement canvas;
+ CanvasElement canvas;
CanvasRenderingContext2D context;
int width = 100;
int height = 100;
- canvas = document.createElement('canvas');
- canvas.setAttribute('width', '$width');
- canvas.setAttribute('height', '$height');
- document.body.appendChild(canvas);
+ canvas = new Element.tag('canvas');
+ canvas.attributes['width'] = width;
+ canvas.attributes['height'] = height;
+ document.body.nodes.add(canvas);
context = canvas.getContext('2d');
- useDomConfiguration();
+ useHtmlConfiguration();
test('CreateImageData', () {
ImageData image = context.createImageData(canvas.width,

Powered by Google App Engine
This is Rietveld 408576698