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

Unified Diff: tests/dom/canvas_using_html_test.dart

Issue 10178014: Copy lib/dom tests that use dart:html to lib/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
« no previous file with comments | « tests/dom/canvas_test.dart ('k') | tests/dom/cross_frame_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/dom/canvas_using_html_test.dart
diff --git a/tests/dom/canvas_using_html_test.dart b/tests/dom/canvas_using_html_test.dart
deleted file mode 100644
index 625b9b1baaaf4151da80b0e47622bfb4c9303bb0..0000000000000000000000000000000000000000
--- a/tests/dom/canvas_using_html_test.dart
+++ /dev/null
@@ -1,57 +0,0 @@
-#library('CanvasUsingHtmlTest');
-#import('../../lib/unittest/unittest.dart');
-#import('../../lib/unittest/html_config.dart');
-#import('dart:html', prefix: 'html');
-#import('dart:html');
-
-// Version of Canvas test that implicitly uses dart:html library via unittests.
-
-main() {
- CanvasElement canvas;
- CanvasRenderingContext2D context;
-
- canvas = new Element.tag('canvas');
- canvas.attributes['width'] = 100;
- canvas.attributes['height'] = 100;
- document.body.nodes.add(canvas);
- context = canvas.getContext('2d');
-
- useHtmlConfiguration();
- test('FillStyle', () {
- context.fillStyle = "red";
- context.fillRect(10, 10, 20, 20);
-
- // TODO(vsm): Verify the result once we have the ability to read pixels.
- });
- test('SetFillColor', () {
- // With floats.
- context.setFillColor(10, 10, 10, 10);
- context.fillRect(10, 10, 20, 20);
-
- // With rationals.
- context.setFillColor(10.0, 10.0, 10.0, 10.0);
- context.fillRect(20, 20, 30, 30);
-
- // With ints.
- context.setFillColor(10, 10, 10, 10);
- context.fillRect(30, 30, 40, 40);
-
- // TODO(vsm): Verify the result once we have the ability to read pixels.
- });
- test('StrokeStyle', () {
- context.strokeStyle = "blue";
- context.strokeRect(30, 30, 10, 20);
-
- // TODO(vsm): Verify the result once we have the ability to read pixels.
- });
- test('CreateImageData', () {
- ImageData image = context.createImageData(canvas.width,
- canvas.height);
- Uint8ClampedArray bytes = image.data;
-
- // FIXME: uncomment when numeric index getters are supported.
- //var byte = bytes[0];
-
- Expect.equals(40000, bytes.length);
- });
-}
« no previous file with comments | « tests/dom/canvas_test.dart ('k') | tests/dom/cross_frame_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698