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

Unified Diff: tests/html/canvasrenderingcontext2d_test.dart

Issue 12393026: Loosening tolerances for canvas test to pass on IE10. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/canvasrenderingcontext2d_test.dart
diff --git a/tests/html/canvasrenderingcontext2d_test.dart b/tests/html/canvasrenderingcontext2d_test.dart
index 6b88843165e5f1b94c8f8cf0fc69bac2abbd1461..495e5e4130d658ba08c2f618023e075d8e1ea66a 100644
--- a/tests/html/canvasrenderingcontext2d_test.dart
+++ b/tests/html/canvasrenderingcontext2d_test.dart
@@ -9,10 +9,10 @@ import 'dart:html';
// Some rounding errors in the browsers.
checkPixel(List<int> pixel, List<int> expected) {
- expect(pixel[0], closeTo(expected[0], 1));
- expect(pixel[1], closeTo(expected[1], 1));
- expect(pixel[2], closeTo(expected[2], 1));
- expect(pixel[3], closeTo(expected[3], 1));
+ expect(pixel[0], closeTo(expected[0], 2));
+ expect(pixel[1], closeTo(expected[1], 2));
+ expect(pixel[2], closeTo(expected[2], 2));
+ expect(pixel[3], closeTo(expected[3], 2));
}
main() {
@@ -37,13 +37,13 @@ main() {
test('setFillColorHsl hue', () {
context.setFillColorHsl(0, 100, 50);
context.fillRect(0, 0, canvas.width, canvas.height);
- expect(readPixel(), [255, 0, 0, 255]);
+ checkPixel(readPixel(), [255, 0, 0, 255]);
});
test('setFillColorHsl hue 2', () {
context.setFillColorHsl(240, 100, 50);
context.fillRect(0, 0, canvas.width, canvas.height);
- expect(readPixel(), [0, 0, 255, 255]);
+ checkPixel(readPixel(), [0, 0, 255, 255]);
});
test('setFillColorHsl sat', () {
@@ -83,7 +83,7 @@ main() {
test('fillStyle', () {
context.fillStyle = "red";
context.fillRect(0, 0, canvas.width, canvas.height);
- expect(readPixel(), [255, 0, 0, 255]);
+ checkPixel(readPixel(), [255, 0, 0, 255]);
});
test('strokeStyle', () {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698