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

Unified Diff: client/tests/client/dom/CanvasTest.dart

Issue 10222026: Migrate dom tests to dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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: client/tests/client/dom/CanvasTest.dart
diff --git a/client/tests/client/dom/CanvasTest.dart b/client/tests/client/dom/CanvasTest.dart
index 4850b639294c9dee39ac1629f13e69ddd0c2895c..1e02d665f00788526239427a8036b4e7c7ed5eeb 100644
--- a/client/tests/client/dom/CanvasTest.dart
+++ b/client/tests/client/dom/CanvasTest.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';
+ 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