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

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

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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('../../pkg/unittest/unittest.dart'); 2 import '../../pkg/unittest/lib/unittest.dart';
3 #import('../../pkg/unittest/html_config.dart'); 3 import '../../pkg/unittest/lib/html_config.dart';
4 #import('dart:html'); 4 import 'dart:html';
5 5
6 main() { 6 main() {
7 CanvasElement canvas; 7 CanvasElement 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 = new Element.tag('canvas'); 12 canvas = new Element.tag('canvas');
13 canvas.attributes['width'] = width; 13 canvas.attributes['width'] = width;
14 canvas.attributes['height'] = height; 14 canvas.attributes['height'] = height;
(...skipping 16 matching lines...) Expand all
31 }); 31 });
32 } 32 }
33 33
34 void checkPixel(Uint8ClampedArray data, int offset, List<int> rgba) 34 void checkPixel(Uint8ClampedArray data, int offset, List<int> rgba)
35 { 35 {
36 offset *= 4; 36 offset *= 4;
37 for (var i = 0; i < 4; ++i) { 37 for (var i = 0; i < 4; ++i) {
38 expect(data[offset + i], equals(rgba[i])); 38 expect(data[offset + i], equals(rgba[i]));
39 } 39 }
40 } 40 }
OLDNEW
« no previous file with comments | « tests/html/canvas_pixel_array_type_alias_test.dart ('k') | tests/html/canvasrenderingcontext2d_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698