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

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

Issue 231413003: using unittest via package import (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 6 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
« no previous file with comments | « tests/html/canvas_test.dart ('k') | tests/html/cdata_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library canvas_rendering_context_2d_test; import '../../pkg/unittest/lib/unittes t.dart'; 5 library canvas_rendering_context_2d_test;
6 import '../../pkg/unittest/lib/html_individual_config.dart'; 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:math'; 8 import 'dart:math';
9 9
10 import 'package:unittest/html_individual_config.dart';
11 import 'package:unittest/unittest.dart';
12
10 // Some rounding errors in the browsers. 13 // Some rounding errors in the browsers.
11 checkPixel(List<int> pixel, List<int> expected) { 14 checkPixel(List<int> pixel, List<int> expected) {
12 expect(pixel[0], closeTo(expected[0], 2)); 15 expect(pixel[0], closeTo(expected[0], 2));
13 expect(pixel[1], closeTo(expected[1], 2)); 16 expect(pixel[1], closeTo(expected[1], 2));
14 expect(pixel[2], closeTo(expected[2], 2)); 17 expect(pixel[2], closeTo(expected[2], 2));
15 expect(pixel[3], closeTo(expected[3], 2)); 18 expect(pixel[3], closeTo(expected[3], 2));
16 } 19 }
17 20
18 var canvas; 21 var canvas;
19 var context; 22 var context;
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 727
725 // The box does not draw after 20 pixels. 728 // The box does not draw after 20 pixels.
726 expectPixelUnfilled(x - 10, y); 729 expectPixelUnfilled(x - 10, y);
727 expectPixelUnfilled(x + maxWidth + 1, y); 730 expectPixelUnfilled(x + maxWidth + 1, y);
728 expectPixelUnfilled(x + maxWidth + 20, y); 731 expectPixelUnfilled(x + maxWidth + 20, y);
729 expectPixelFilled(x, y); 732 expectPixelFilled(x, y);
730 expectPixelFilled(x + 10, y); 733 expectPixelFilled(x + 10, y);
731 }); 734 });
732 }); 735 });
733 } 736 }
OLDNEW
« no previous file with comments | « tests/html/canvas_test.dart ('k') | tests/html/cdata_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698