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

Unified Diff: tests/dom/canvas_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_test.dart
diff --git a/tests/dom/canvas_test.dart b/tests/dom/canvas_test.dart
index e63ed0e0d19e05d6f8b23a9ce2999429f3c0c8c0..0affdac9a36ad98211570f80579b8b920bb5e86a 100644
--- a/tests/dom/canvas_test.dart
+++ b/tests/dom/canvas_test.dart
@@ -1,22 +1,22 @@
#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');
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';
Anton Muhin 2012/04/27 12:06:34 do you need to stringify those?
+ canvas.attributes['height'] = '$height';
+ document.body.nodes.add(canvas);
context = canvas.getContext('2d');
- useDomConfiguration();
+ useHtmlConfiguration();
test('FillStyle', () {
context.fillStyle = "red";
context.fillRect(10, 10, 20, 20);

Powered by Google App Engine
This is Rietveld 408576698