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

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: 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
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; import 'package:unittest/unittest.dart ';
Siggi Cherem (dart-lang) 2014/04/09 19:28:58 might be good to fix this while you are here
kevmoo 2014/04/09 19:41:08 Done.
6 import '../../pkg/unittest/lib/html_individual_config.dart'; 6 import 'package:unittest/html_individual_config.dart';
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:math'; 8 import 'dart:math';
9 9
10 // Some rounding errors in the browsers. 10 // Some rounding errors in the browsers.
11 checkPixel(List<int> pixel, List<int> expected) { 11 checkPixel(List<int> pixel, List<int> expected) {
12 expect(pixel[0], closeTo(expected[0], 2)); 12 expect(pixel[0], closeTo(expected[0], 2));
13 expect(pixel[1], closeTo(expected[1], 2)); 13 expect(pixel[1], closeTo(expected[1], 2));
14 expect(pixel[2], closeTo(expected[2], 2)); 14 expect(pixel[2], closeTo(expected[2], 2));
15 expect(pixel[3], closeTo(expected[3], 2)); 15 expect(pixel[3], closeTo(expected[3], 2));
16 } 16 }
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 724
725 // The box does not draw after 20 pixels. 725 // The box does not draw after 20 pixels.
726 expectPixelUnfilled(x - 10, y); 726 expectPixelUnfilled(x - 10, y);
727 expectPixelUnfilled(x + maxWidth + 1, y); 727 expectPixelUnfilled(x + maxWidth + 1, y);
728 expectPixelUnfilled(x + maxWidth + 20, y); 728 expectPixelUnfilled(x + maxWidth + 20, y);
729 expectPixelFilled(x, y); 729 expectPixelFilled(x, y);
730 expectPixelFilled(x + 10, y); 730 expectPixelFilled(x + 10, y);
731 }); 731 });
732 }); 732 });
733 } 733 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698