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

Side by Side Diff: tests/dom/canvas_test.dart

Issue 10191033: test renaming overhaul: step 4 client tests (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #library('CanvasTest'); 1 #library('CanvasTest');
2 #import('../../../../lib/unittest/unittest.dart'); 2 #import('../../lib/unittest/unittest.dart');
3 #import('../../../../lib/unittest/dom_config.dart'); 3 #import('../../lib/unittest/dom_config.dart');
4 #import('dart:dom'); 4 #import('dart:dom');
5 5
6 main() { 6 main() {
7 HTMLCanvasElement canvas; 7 HTMLCanvasElement canvas;
8 CanvasRenderingContext2D context; 8 CanvasRenderingContext2D context;
9 int width = 100; 9 int width = 100;
10 int height = 100; 10 int height = 100;
11 11
12 canvas = document.createElement('canvas'); 12 canvas = document.createElement('canvas');
13 canvas.setAttribute('width', '$width'); 13 canvas.setAttribute('width', '$width');
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 }); 81 });
82 } 82 }
83 83
84 void checkPixel(Uint8ClampedArray data, int offset, List<int> rgba) 84 void checkPixel(Uint8ClampedArray data, int offset, List<int> rgba)
85 { 85 {
86 offset *= 4; 86 offset *= 4;
87 for (var i = 0; i < 4; ++i) { 87 for (var i = 0; i < 4; ++i) {
88 Expect.equals(rgba[i], data[offset + i]); 88 Expect.equals(rgba[i], data[offset + i]);
89 } 89 }
90 } 90 }
OLDNEW
« no previous file with comments | « tests/dom/canvas_pixel_array_type_alias_test.dart ('k') | tests/dom/canvas_using_html_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698