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

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

Issue 218283002: tests: import unittest via package: url (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
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 ';
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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 738
739 // The box does not draw after 20 pixels. 739 // The box does not draw after 20 pixels.
740 expectPixelUnfilled(x - 10, y); 740 expectPixelUnfilled(x - 10, y);
741 expectPixelUnfilled(x + maxWidth + 1, y); 741 expectPixelUnfilled(x + maxWidth + 1, y);
742 expectPixelUnfilled(x + maxWidth + 20, y); 742 expectPixelUnfilled(x + maxWidth + 20, y);
743 expectPixelFilled(x, y); 743 expectPixelFilled(x, y);
744 expectPixelFilled(x + 10, y); 744 expectPixelFilled(x + 10, y);
745 }); 745 });
746 }); 746 });
747 } 747 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698